Observe the candidate before waiting on Odin's evidence in AwaitingReady, Routing, and Committing
A candidate that died while its correlation was pending was never observed again: each phase returned on no-evidence-yet every tick, the error that triggers the post-fencing abort never happened, and the transaction owned the target forever behind a process that was gone. Seen on yggdrasil with a continuity transaction parked in Committing across the projection-key migration. Verified with cargo test --lib in rust:1.95-bookworm on yggdrasil: 114 passed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
903e1c8e63
commit
1a0a0e7958
1 changed files with 19 additions and 0 deletions
|
|
@ -4103,6 +4103,7 @@ impl Engine {
|
|||
fn advance_awaiting_ready(&self, current: &Stored<DeploymentTransaction>) -> Result<()> {
|
||||
let now = now_millis()?;
|
||||
let expected = required(¤t.value.expected, "Expected projection")?;
|
||||
self.observe_candidate_before_waiting(¤t.value)?;
|
||||
if expected.write_lease_required {
|
||||
let activation = required(¤t.value.activation, "activation")?;
|
||||
let warming = self.rehydrate_warming_token(¤t.value, now, false)?;
|
||||
|
|
@ -4166,6 +4167,7 @@ impl Engine {
|
|||
fn advance_routing(&self, current: &Stored<DeploymentTransaction>) -> Result<()> {
|
||||
let expected = required(¤t.value.expected, "Expected projection")?;
|
||||
let activation = required(¤t.value.activation, "activation")?;
|
||||
self.observe_candidate_before_waiting(¤t.value)?;
|
||||
if current.value.routing.is_none() {
|
||||
let current_lease = current
|
||||
.value
|
||||
|
|
@ -4275,6 +4277,7 @@ impl Engine {
|
|||
}
|
||||
|
||||
fn advance_committing(&self, current: &Stored<DeploymentTransaction>) -> Result<()> {
|
||||
self.observe_candidate_before_waiting(¤t.value)?;
|
||||
let current_lease_sha256 = current
|
||||
.value
|
||||
.leasing
|
||||
|
|
@ -4747,6 +4750,22 @@ impl Engine {
|
|||
}
|
||||
}
|
||||
|
||||
/// A phase that waits on Odin's evidence about the candidate must first
|
||||
/// confirm the candidate still exists. Otherwise a candidate that died
|
||||
/// while its correlation was pending is never observed again: the phase
|
||||
/// returns early on "no evidence yet" every tick, the error that would have
|
||||
/// triggered the post-fencing abort never happens, and the transaction
|
||||
/// owns the target forever behind a process that is gone.
|
||||
fn observe_candidate_before_waiting(&self, transaction: &DeploymentTransaction) -> Result<()> {
|
||||
self.workload
|
||||
.observe(
|
||||
required(&transaction.expected, "Expected projection")?,
|
||||
required(&transaction.activation, "activation")?,
|
||||
required(&transaction.workload, "candidate workload")?,
|
||||
)
|
||||
.map(|_| ())
|
||||
}
|
||||
|
||||
/// The lifecycle brake as it applies to restarting one admitted
|
||||
/// generation: the same evaluation `lifecycle_allows` makes for a
|
||||
/// continuity transaction, asked before one is minted.
|
||||
|
|
|
|||
Loading…
Reference in a new issue