Skip to content

[runtime][java] Add durable reconcile support with reconcile callables#600

Open
joeyutong wants to merge 2 commits intoapache:mainfrom
joeyutong:codex/reconcile-callable-pr1
Open

[runtime][java] Add durable reconcile support with reconcile callables#600
joeyutong wants to merge 2 commits intoapache:mainfrom
joeyutong:codex/reconcile-callable-pr1

Conversation

@joeyutong
Copy link
Copy Markdown
Contributor

Purpose of change

This PR adds Java-side durable reconcile support based on a reconcile callable.

With this change, a DurableCallable can optionally provide a reconcile callable through reconcile(). When recovery hits a PENDING durable call, the runtime invokes that reconcile callable to recover a terminal result or terminal failure, or falls back to executing the original call() when the reconcile path cannot determine the terminal state.

This PR includes:

  • a new DurableCallable.reconcile() API for Java durable calls
  • a new ReconcileFallbackException to signal fallback to the original call()
  • runtime changes in RunnerContextImpl and JavaRunnerContextImpl to route sync and async durable execution through the reconcile path when a reconcile callable is provided
  • state model updates in ActionState and CallResult to support PENDING / terminal transitions for reconcile-based recovery
  • unit and operator recovery tests covering recovered success, recovered terminal failure, and fallback execution

The detailed design discussion is available here:
design discussion

Tests

This change is covered by:

  • ReconcileFallbackExceptionTest
  • CallResultTest
  • ActionStateTest
  • ActionStateSerdeTest
  • DurableExecutionContextTest
  • RunnerContextImplDurableExecuteTest
  • JavaRunnerContextImplDurableExecuteAsyncTest
  • ActionExecutionOperatorTest

API

Yes.

This PR introduces Java public API changes:

  • DurableCallable adds an optional @Nullable Callable<T> reconcile() hook
  • ReconcileFallbackException is added for reconcile fallback signaling
  • RunnerContext JavaDoc is updated to describe reconcile-callable durable execution semantics

Documentation

  • doc-needed
  • doc-not-needed
  • doc-included

@github-actions github-actions bot added doc-needed Your PR changes impact docs. fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue. labels Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-needed Your PR changes impact docs. fixVersion/0.3.0 The feature or bug should be implemented/fixed in the 0.3.0 version. priority/major Default priority of the PR or issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant