Orchestration completion and failure are logged and counted before the commit

未关闭
#60 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust

调研方向

Start in src/runtime/dispatchers/orchestration.rs, reading the log and metric code around lines 741-893, the first-turn metrics around 670-681, and the commit around 949-961. Trace ack_orchestration_item and verify that terminal logs and metrics occur only after a successful commit, including the lost-lock case described in the issue.

由索引模型根据 Issue 内容生成。

描述

bug

Summary

process_orchestration_item writes the "Orchestration completed" and "Orchestration failed" log lines, and records the completion and failure metrics, before it calls ack_orchestration_item. When the commit is rejected, the logs and the metrics describe something that did not happen.

Where

Effects

  • A turn that lost its lock still logs Orchestration failed at ERROR, or Orchestration completed. Its commit is then rejected with Invalid lock token. An operator sees an error for an instance that is healthy.
  • record_orchestration_completion_with_labels, record_orchestration_failure_with_labels and record_continue_as_new count a turn that was not committed. The turn that commits later is counted again.
  • decrement_active_orchestrations runs twice for one instance, so the active gauge drifts down.

How this was checked

Read in the code. A local reproduction of a lost lock showed the log pattern: the turn logged Orchestration failed at ERROR, and the next line was ack_orchestration_item failed with non-retryable error with Invalid lock token.

Suggested fix

Write the terminal logs and record the metrics after a successful commit. PR #49 does this for the poison path. This is the same change for the normal path.

Tracked in #55.

主要语言
Rust
星标
235
派生
63
平均合并
2 天 1 小时
30 天内合并 PR
7

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/duroxide 的其他 Issue

查看 microsoft/duroxide 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。