Skip to content

feat(consensus): cache reply payload and notify subscriber on commit#3223

Open
krishvishal wants to merge 3 commits intoapache:masterfrom
krishvishal:client-table-notify
Open

feat(consensus): cache reply payload and notify subscriber on commit#3223
krishvishal wants to merge 3 commits intoapache:masterfrom
krishvishal:client-table-notify

Conversation

@krishvishal
Copy link
Copy Markdown
Contributor

Summary

  • Cache committed reply bytes per-client in ClientTable (CachedReply, refcounted Frozenbuffer, Arc-bump on dedup) and deliver them to in-process subscribers via a oneshot channel embedded inPipelineEntry. Replaces the prior Notify/pending-map indirection; awaiters no longer need a separate cache lookup after wakeup.
  • ClientTable is metadata-only. Partition plane is at-least-once; consumers handle duplicates.
  • New EvictionHeader / EvictionReason wire frame; typed reasons let the SDK trigger its eviction callback.
  • Two-queue pipeline: prepare_queue (cap 8) plus a buffered request_queue (cap 64). is_full() reports only the prepare queue so admission stays separate from drop-on-full backpressure. View-change reset cancels subscribers and clears the request queue; the prepare queue survives for DVC reconciliation.

@krishvishal krishvishal force-pushed the client-table-notify branch from 3dac3e9 to ff31ebd Compare May 7, 2026 08:03
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 78.37134% with 332 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.47%. Comparing base (140f3c5) to head (63b62c8).

Files with missing lines Patch % Lines
core/metadata/src/impls/metadata.rs 17.85% 134 Missing and 4 partials ⚠️
core/consensus/src/oneshot.rs 78.30% 41 Missing ⚠️
core/partitions/src/iggy_partition.rs 28.30% 35 Missing and 3 partials ⚠️
core/consensus/src/metadata_helpers.rs 92.21% 32 Missing ⚠️
core/consensus/src/impls.rs 91.79% 18 Missing and 4 partials ⚠️
core/binary_protocol/src/consensus/header.rs 82.30% 20 Missing ⚠️
core/server-ng/src/register_submitter.rs 0.00% 17 Missing ⚠️
core/consensus/src/lib.rs 0.00% 11 Missing ⚠️
core/server-ng/src/login_register.rs 89.33% 6 Missing and 2 partials ⚠️
core/consensus/src/client_table.rs 98.56% 1 Missing and 1 partial ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3223      +/-   ##
============================================
- Coverage     74.48%   74.47%   -0.01%     
  Complexity      943      943              
============================================
  Files          1188     1192       +4     
  Lines        106530   107619    +1089     
  Branches      83560    84666    +1106     
============================================
+ Hits          79350    80154     +804     
- Misses        24433    24679     +246     
- Partials       2747     2786      +39     
Components Coverage Δ
Rust Core 75.74% <78.37%> (-0.01%) ⬇️
Java SDK 60.14% <ø> (ø)
C# SDK 69.07% <ø> (-0.31%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.53% <ø> (ø)
Go SDK 39.80% <ø> (ø)
Files with missing lines Coverage Δ
core/binary_protocol/src/consensus/command.rs 100.00% <100.00%> (ø)
core/sdk/src/session.rs 97.19% <ø> (ø)
core/simulator/src/ready_queue.rs 83.08% <ø> (ø)
core/binary_protocol/src/consensus/message.rs 49.27% <0.00%> (-0.18%) ⬇️
core/consensus/src/plane_helpers.rs 81.18% <94.73%> (-0.83%) ⬇️
core/simulator/src/lib.rs 88.11% <98.57%> (+1.88%) ⬆️
core/consensus/src/client_table.rs 95.52% <98.56%> (+1.80%) ⬆️
core/server-ng/src/login_register.rs 91.08% <89.33%> (+1.48%) ⬆️
core/consensus/src/lib.rs 0.00% <0.00%> (ø)
core/server-ng/src/register_submitter.rs 0.00% <0.00%> (ø)
... and 6 more

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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