Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/zart/src/context/task_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,16 @@ impl TaskContext {
}
};

// Wrap run_with_serialization so the step body executes in Phase::Step.
// This allows `zart::trx()` to detect it is inside a step invocation.
let step_ctx_for_phase = self.step_context();
let run_with_serialization = move || {
crate::local::ZART_PHASE.scope(
crate::local::Phase::Step(step_ctx_for_phase),
run_with_serialization(),
)
};

// Transactional step completion (Scenario 2): wrap the step execution
// AND completion with the STEP_TRX task-local so `zart::trx()` can
// register a transaction for atomic completion.
Expand Down
Loading