Skip to content

[VQueues] Commands for pause/resume in WAL protocol#4701

Draft
AhmedSoliman wants to merge 4 commits intomainfrom
pr4701
Draft

[VQueues] Commands for pause/resume in WAL protocol#4701
AhmedSoliman wants to merge 4 commits intomainfrom
pr4701

Conversation

@AhmedSoliman
Copy link
Copy Markdown
Contributor

@AhmedSoliman AhmedSoliman commented May 7, 2026

This implements the pause/resume commands for a batch of vqueue IDs in WAL protocol and the state machine. Note that this does not
add any facility to initiate those commands. This will be done separately.


Stack created with Sapling. Best reviewed with ReviewStack.

Replaces the single-head cache with a sorted 24-entry per-queue cache.
Refills run via tokio::task::spawn_blocking when data isn't in the
block cache; in-flight notify_enqueued / notify_removed events are
buffered as an overlay (Add / Tombstone) and merged on completion.

On overlay overflow we set a horizon (exclusive upper bound) instead
of back-eviction: a popped tombstone could otherwise re-admit a
deleted row. Storage rows at or above the horizon are dropped from
the merge and rediscovered on the next refill.

Drops the tailing iterator and its workarounds. Splits VQueueCursor
into inbox (returns CursorError; WouldBlock under non-blocking opts)
and VQueueRunningCursor (sync).
Expose vqueue entries as a single DataFusion table with stage-aware scanning.
When the query filters `stage`, only matching stage key kinds are scanned;
without a stage filter, all inbox stages are scanned and merged.

Also project the latest entry metadata for observability (status plus
EntryStatistics timestamps and counters), and add targeted tests for stage
predicate extraction and sys_vqueues stage filtering behavior.
This implements the pause/resume commands for a batch of vqueue IDs in WAL protocol and the state machine. Note that this does not
add any facility to initiate those commands. This will be done separately.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Test Results

  8 files  + 1    8 suites  +1   4m 54s ⏱️ + 2m 7s
 50 tests + 3   50 ✅ + 3  0 💤 ±0  0 ❌ ±0 
218 runs  +18  218 ✅ +18  0 💤 ±0  0 ❌ ±0 

Results for commit 8ea2cd1. ± Comparison against base commit b128276.

This pull request removes 4 and adds 7 tests. Note that renamed tests count towards both.
dev.restate.sdktesting.tests.KafkaIngress ‑ handleEventInCounterService(URI, int, Client)
dev.restate.sdktesting.tests.KafkaIngress ‑ handleEventInEventHandler(URI, int, Client)
dev.restate.sdktesting.tests.UpgradeWithInFlightInvocation ‑ inFlightInvocation(Client, URI)
dev.restate.sdktesting.tests.UpgradeWithNewInvocation ‑ executesNewInvocationWithLatestServiceRevisions(Client, URI)
dev.restate.sdktesting.tests.Combinators ‑ awakeableOrTimeoutUsingAwaitAny(Client)
dev.restate.sdktesting.tests.Combinators ‑ firstSuccessfulCompletedAwakeable(Client)
dev.restate.sdktesting.tests.Custom ‑ run(CustomTestConfig, URI, URI)[1]
dev.restate.sdktesting.tests.UserErrors ‑ failSeveralTimesWithMetadata(URI)
dev.restate.sdktesting.tests.UserErrors ‑ internalCallFailurePropagationWithMetadata(URI)
dev.restate.sdktesting.tests.UserErrors ‑ invokeTerminallyFailingCallWithMetadata(URI)
dev.restate.sdktesting.tests.UserErrors ‑ sideEffectWithTerminalErrorWithMetadata(URI)

♻️ This comment has been updated with latest results.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant