Skip to content

[VQueues] Share vqueues cache between scheduler and RSM#4699

Open
AhmedSoliman wants to merge 2 commits intomainfrom
pr4699
Open

[VQueues] Share vqueues cache between scheduler and RSM#4699
AhmedSoliman wants to merge 2 commits intomainfrom
pr4699

Conversation

@AhmedSoliman
Copy link
Copy Markdown
Contributor

@AhmedSoliman AhmedSoliman commented May 6, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Test Results

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

Results for commit da5e382. ± 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.

@AhmedSoliman AhmedSoliman marked this pull request as ready for review May 6, 2026 17:26
@AhmedSoliman AhmedSoliman force-pushed the pr4699 branch 2 times, most recently from d8668b4 to 5f301d7 Compare May 6, 2026 19:59
@restatedev restatedev deleted a comment from chatgpt-codex-connector Bot May 7, 2026
Comment on lines 67 to +78
@@ -75,7 +75,7 @@ where
OP_TYPE => self.kind.as_static_str(),
)
.increment(1);
let span = tracing::Span::current().clone();
let span = tracing::Span::current();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR but happened to spot it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :-)

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).
Copy link
Copy Markdown
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @AhmedSoliman. LGTM. +1 for merging :-)

.eligible
.refresh_membership(event.queue, slot.meta(), qstate)
{
self.wake_up();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we plan to no longer taskify the scheduler, should we also get rid of the self.wake_up calls? Or do they still have a purpose?

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.

2 participants