Skip to content

chore/feat (driver): introduce early cancellation signal for auction work #4380

@metalurgical

Description

@metalurgical

Background

Auction deadlines in the driver are currently only observed when results are finalized. However, work that is already in progress can continue running after the auction deadline has passed.

This means that stale auction work could continue being processed even though it can no longer contribute to the auction.

Resolving this reduces unnecessary execution and frees resources for subsequent auctions.

Details

Propagate a cancellation signal through the auction driver so tasks can terminate once the auction deadline is reached.

This should cover both asynchronous and blocking tasks.

Blocking work should observe cancellation cooperatively and return early where possible.

Cancellation should not change how valid results are produced, it should only stop stale work once the auction is expired.

Acceptance criteria

  • Add a deadline cancellation mechanism.
  • Propagate cancellation mechanism through auction stages in the driver.
  • Adapt async tasks to observe and adhere to cancellation.
  • Adapt shared tasks to observe and adhere to deadline cancellation.
  • Adapt blocking tasks to observe and adhere to cancellation cooperatively.
  • Add metrics for cancellations related to the auction deadline.
  • Add tests.

Linked PR

#4379

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions