microsoft / microsoft/durabletask-java

ContinueAsNew does not support specifying a new orchestration version

オープン
#276 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Needs: Triage :mag:
主要言語
Java
スター
29
フォーク
18
平均マージ
1日 10時間
マージ済み PR(30日)
2

説明

Summary

The continueAsNew() API does not expose a way to specify a new orchestration version for the restarted instance. The underlying protobuf field (CompleteOrchestrationAction.newVersion, field 4) has existed since the initial proto commit, but the Java SDK never populates it.

Problem

TaskOrchestrationContext.continueAsNew() only accepts (Object input, boolean preserveUnprocessedEvents). There is no parameter to pass a new version. In TaskOrchestrationExecutor, when building the CompleteOrchestrationAction, setNewVersion() is never called — the field is always left empty.

This prevents version migration scenarios for long-running/eternal orchestrations (e.g., monitoring loops that need to evolve their logic over time via continueAsNew with a new version).

What exists today

  • Proto layer: CompleteOrchestrationAction.newVersion (field 4) is defined and supported by all backends (DurableTask.Core since 2014, DTS/Beskar, gRPC sidecar)
  • Java API: continueAsNew(Object input) and continueAsNew(Object input, boolean preserveUnprocessedEvents) — no version parameter
  • Java executor: CompleteOrchestrationAction.Builder never calls setNewVersion()

Proposed fix

Follow the pattern from the .NET SDK (microsoft/durabletask-dotnet#682):

  1. Add a ContinueAsNewOptions class with newInput, preserveUnprocessedEvents, and newVersion properties
  2. Add a continueAsNew(ContinueAsNewOptions options) overload to TaskOrchestrationContext
  3. In TaskOrchestrationExecutor, when newVersion is non-null, call builder.setNewVersion(StringValue.of(newVersion)) on the CompleteOrchestrationAction

Related

  • .NET SDK implementation: microsoft/durabletask-dotnet#682
  • Azure Functions extension: Azure/azure-functions-durable-extension#3404
  • Proto field: CompleteOrchestrationAction.newVersion (field 4) in orchestrator_service.proto

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず TaskOrchestrationContext と TaskOrchestrationExecutor を見つけ、次に既存の continueAsNew オーバーロードと CompleteOrchestrationAction の構築を調べます。提案されているオプションの形状については、説明にリンクされている .NET SDK の issue を参考にしてください。Java の呼び出し元が新しいバージョンを指定でき、現在の動作を維持したまま executor が CompleteOrchestrationAction.newVersion に値を設定できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
backend-api-design, distributed-systems
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。