Skip to content

Lock renewal and abandon: sub-second extensions and missing retries #49

Open

Description

@waldemort-auto

Summary

Two small gaps in the lock calls:

  1. Whole-second extensions.
    • renew_orchestration_item_lock and renew_work_item_lock in src/provider.rs pass the extension as extend_for.as_secs() to procedures that take p_extend_secs BIGINT.
    • An extension under 1 s becomes 0, and the fractional part of any extension is lost.
    • Fix: pass milliseconds. This needs new procedure signatures or a millisecond variant. The Provider trait does not change.
  2. No retry on abandon.
    • abandon_orchestration_item returns transient errors straight to the runtime. Fetch, acknowledge and, since fix: make orchestration lock renewal and acknowledge safe under concurrency #44, renewal retry them up to 3 times with 50, 100 and 150 ms backoff.
    • The worker-queue calls (fetch_work_item, ack_work_item, renew_work_item_lock, abandon_work_item) do not retry either.
    • Fix: move the retry loop into one helper and use it for all of these calls.

Related:

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions