Skip to content

Client query timeout and cancellation do not cover bookmark validation waits #182

Description

@Charan6924

A query with a causal bookmark validates the bookmark before entering the normal active query and timeout lifecycle.

If the backend has not reached the bookmark’s storage sequence, the request can wait using the backend’s longer bookmark-wait limit rather than the caller specified max_runtime_ms. During that wait, the query is not yet in the active query map so it cannot be cancelled.

Expected behavior:

  • Bookmark waiting consumes the same runtime budget as the query.
  • A query times out if the bookmark is not satisfied before its deadline.
  • A cancel request interrupts an in progress bookmark wait.
  • The read does not execute after timeout or cancellation.

Proposed fix:

  • Keep the current bookmark graph/cell ownership check in the request preparation code
  • Move the storage sequence wait into the query execution block after the request has been registered as active (to allow cancellations)
  • Make the wait obey the specified time budget and cancellation token
  • Apply this to both direct row execution and prepared/paged execution

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