Skip to content

[LogServer][1/N] Respond with SortCodeNotFound when loglet worker is closed#4461

Open
AhmedSoliman wants to merge 4 commits intomainfrom
pr4461
Open

[LogServer][1/N] Respond with SortCodeNotFound when loglet worker is closed#4461
AhmedSoliman wants to merge 4 commits intomainfrom
pr4461

Conversation

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Test Results

  7 files    7 suites   4m 31s ⏱️
 49 tests  48 ✅ 0 💤 1 ❌
210 runs  209 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit e289b48.

♻️ This comment has been updated with latest results.

Extract two generic, reusable utilities into restate-futures-util:

**monotonic_token**: A lightweight mechanism for a producer to signal
completion of a prefix of sequentially issued work items. Provides
Token<T>, TokenOwner<T>, Tokens<T>, and TokenListener<T> types with
a phantom type parameter to prevent mixing tokens from different domains.
Uses atomics (Relaxed/Release/Acquire) for lock-free operation — no
RwLock or watch overhead.

**waiter_queue**: A priority-drainable queue (WaiterQueue<K, V>) designed
for the common case where entries arrive in key-order. Uses an adaptive
strategy: push_back for in-order inserts (O(1)), binary-search insert for
out-of-order (rare). Drain is always a simple front-pop. Includes a
Criterion benchmark comparing four strategies (naive, compact,
adaptive, sorted-insert).

Both modules include comprehensive documentation and tests. Neither
references any specific use-case — they are general-purpose building
blocks.
…closed

This makes turning off loglet workers cleaner (next PR).
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