fix(deploy): #1107 review — correct the rolling-upgrade residual: a pre-#1107 node re-applies its own re-send on either transport while its ack is held; upgrade driver nodes before central

This commit is contained in:
Joseph Doherty
2026-12-04 22:34:10 -05:00
parent 323bbd2a63
commit ba20eabbfa
+7 -2
View File
@@ -837,8 +837,13 @@ dial was dropped — either way the deployment sat until the 120 s deadline and
16 deployments) instead of applying again — so a lost ack is recovered and a duplicate ack is harmless
(the coordinator re-persists the same outcome, or discards it as stale). An ORIGINAL dispatch is unchanged:
re-dispatching a degraded revision still re-applies.
- **Residuals.** A pre-#1107 node on the **DPS** transport ignores `TargetNodes`, so during a rolling upgrade
it can re-apply on a re-send meant for its peer (gRPC is unaffected — central filters). The node's memory
- **Residuals.** A pre-#1107 node ignores `TargetNodes` and has none of the node-side idempotence, so during a
rolling upgrade with central upgraded first it treats every re-send that reaches it as an original dispatch. On
**DPS** that includes re-sends meant for its peer. On **either** transport it includes the common case of its
OWN re-send while its Applied ack is still held on the address-space outcome (any apply slower than 5 s): the
old node re-applies the same revision (the pre-#1107 `_pendingAcks` revision check forces it) and supersedes
the held ack. The second apply's diff is empty, so this is redundant work rather than an outage, but
**upgrade the driver nodes before central** to avoid it. The node's memory
is process-local: a node that restarted after acking treats a re-send as a first dispatch (short-circuit,
or a re-apply if its revision is unconfirmed). A node that first receives the dispatch at +35 s still has
~85 s to ack; only a rebuild slower than that, which already acks degraded at 105 s, can miss the deadline.