You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Individual ACKs racing with a durable cursor reset can overwrite its checkpoint or lose their callback #27668
Found during managed-ledger review of #26973. The same ordering exists on master at 38b4615c72b. Review discussion
Issue description
An individual ACK arriving through asyncDelete after a durable cursor reset has submitted its write can run into two cases.
If the ACK is submitted immediately, it can append a cursor record computed from the pre-reset state after the reset record. The reset can report success, then recovery can load that later record and undo the reset. Reviewer reproduction
If a read is pending, the ACK's mark-delete entry can queue after the reset write was submitted. When reset completes successfully, it clears pendingMarkDeleteOps and the queued ACK's callback is never invoked. This path was identified in review and confirmed by source inspection. Review follow-up
Reproducing the issue
Pause completion of a submitted backward reset, issue an individual ACK, then let the reset complete. Inspect the last cursor-ledger record or recover from it before a graceful close can rewrite the checkpoint.
Pause completion of a submitted reset, then hold a read open and issue an individual ACK so it queues. Release the reset before the read and check whether the ACK callback completes.
Expected behavior
Recovery after a successful reset preserves the reset checkpoint and any ACKs valid under the chosen ordering. Each ACK callback completes exactly once with the corresponding result. Cover both interleavings with deterministic tests and coordinate ACK admission and queue settlement under the same pendingMarkDeleteOps lock.
Activity