fix(deploy): #1111 review — cover the held-ack retry guard; clamp deadline_remaining_ms off the wire
- The _pendingAcks.Count == 0 guard (a stale re-send of an older FAILED deployment must not re-apply it while a NEWER apply's Applied ack is held on its address-space outcome) had no test: mutating it to true left every Runtime test green. New test fails under that mutation (the older revision is re-fetched and applied over the newer one, whose held Applied ack then goes out for a rolled-back node). - MeshTransportDtoMapper.FromProto clamps deadline_remaining_ms to [0, 1 day]: a long.MaxValue wire value threw from TimeSpan.FromMilliseconds; a hugely negative one could overflow the node's TimeSpan subtraction in HandleDispatchFromSteady (actor restart = remembered acks lost). - Doc fix: _lastAnsweredDeploymentId is moved by RememberAck only, not by a replay.
This commit is contained in:
@@ -372,8 +372,8 @@ public sealed partial class DriverHostActor : ReceiveActor, IWithTimers, IWithUn
|
||||
private readonly Queue<DeploymentId> _recentAckOrder = new();
|
||||
|
||||
/// <summary>
|
||||
/// #1111: the deployment this node sent its most recent ack for (any outcome, including a re-delivery's
|
||||
/// re-ack of the same deployment). A re-send of a deployment whose remembered ack is <c>Failed</c> is
|
||||
/// #1111: the deployment this node most recently PRODUCED an ack for (any outcome; set by
|
||||
/// <see cref="RememberAck"/> — a replay of a remembered ack does not move it). A re-send of a deployment whose remembered ack is <c>Failed</c> is
|
||||
/// re-attempted only while that deployment is still this node's latest answer — retrying an OLDER failed
|
||||
/// deployment after a newer one was applied would roll the node back.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user