Skip to content

Queue storage: an ambiguous receipt claim can pin a slot's rescue cursor #693

Open

Description

@hardbyte

In receipt mode, one stale claim that rescue cannot settle can stop rescue in that claim slot from reaching later stale claims.

Rescue skips an attempt whose retained ready bodies are ambiguous, logs it, and leaves the claim open. The slot's receipt-rescue cursor only advances past claims that are closed, lease-managed, or closed by the current statement, so the cursor stays on the skipped claim. Each pass scans at most RECEIPT_RESCUE_CURSOR_SCAN_LIMIT (10,000) claims from the cursor, so stale claims more than 10,000 positions after it in the same slot are never reached. The open claim also keeps the slot from being pruned. The stale-heartbeat and deadline receipt sweeps both have this shape.

The lease-plane equivalent, where ambiguous attempts filled the frozen 500-row selection, is fixed in #691. This is the receipt-plane remainder. It is most likely with legacy claims that have no emitted-lane evidence.

Possible directions: advance the cursor past attempts that the current pass has excluded as ambiguous, keeping a separate record so they're still reported; or add a bounded side scan past the pinned position. A regression test needs more than the scan limit of stale claims behind one ambiguous claim in a single slot, with lease_claim_receipts enabled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions