A failed commit becomes a permanent OrchestrationFailed without parent notification; the fallback abandon never runs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start with process_orchestration_item and ack_orchestration_with_changes in src/runtime/dispatchers/orchestration.rs, then read the related design in #55. Trace the retry and error branches, including both abandon_orchestration_item calls; done means the chosen failure behavior executes asynchronously and does not leave parent notification or activity cancellation missing.
索引モデルが issue の本文から書いたものです。
説明
Summary
When ack_orchestration_item fails, the runtime commits an OrchestrationFailed event for the instance. It does this for every error that the provider calls non-retryable, and for a retryable error that lasts longer than about 310 ms. So a database problem that goes away can end an orchestration for good.
The same code path has two more problems:
- The failure is committed without messages. A parent orchestration gets no
SubOrchFailedand waits forever. - The fallback call to
abandon_orchestration_itemnever runs.
Where
process_orchestration_item, the ack and its error branch: https://github.com/microsoft/duroxide/blob/6a458861763a7aa5b78a7c1c97691a6f00489a8b/src/runtime/dispatchers/orchestration.rs#L949-L1017ack_orchestration_with_changes, the retry loop: https://github.com/microsoft/duroxide/blob/6a458861763a7aa5b78a7c1c97691a6f00489a8b/src/runtime/dispatchers/orchestration.rs#L1161-L1210
Details
- Retry budget. A retryable error is retried 5 times, with waits of 10, 20, 40, 80 and 160 ms. Then the error is returned (L1191-L1206). A non-retryable error is returned at once (L1183-L1188).
- Failure commit. The caller builds
OrchestrationFailedfrom the history it fetched and commits it with the same lock token (L975-L1001). If the database is healthy again at that moment, the commit works and the instance isFailed. - No messages. That commit passes empty
worker_items,orchestrator_itemsandcancelled_activities(L990-L999). If the instance is a sub-orchestration, its parent is not told. In-flight activities are not cancelled. - The abandon never runs. Both fallback paths call
drop(self.history_store.abandon_orchestration_item(...))(L1009-L1013 and L1200-L1204).abandon_orchestration_itemis anasync fn. A future that is dropped without.awaitdoes nothing. The lock is only released when it times out.
Which errors are non-retryable depends on the provider. duroxide-pg classifies almost every SQLSTATE as permanent, including a statement timeout: microsoft/duroxide-pg#30.
How this was checked
Found by reading the code. Not reproduced.
Suggested fix
- Do not fail the instance for an infrastructure error on commit. Abandon the item with a backoff, and let
max_attemptsend a message that can never commit. - If the failure commit stays, queue
SubOrchFailedfor the parent and cancel the in-flight activities, as the normal failure path does. .awaitthe twoabandon_orchestration_itemcalls.
Tracked in #55.
- 主要言語
- Rust
- スター
- 226
- フォーク
- 62
- 平均マージ
- 20時間 46分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/duroxide のほかの issue
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
One failed session lock renewal loses the session: no retry, no log, no signal to running activitiesオープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
microsoft/duroxide の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
Negative subscript on a sparse array counts from the number of elements, not from the highest indexオープンarea: compat bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
reubeno/brush#1570 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
longbridge/gpui-kit#3620 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
mongodb/kingfisher#564 ·
メンテナーはふだん 1 日以内に返信