Skip to content

feat(consensus): add ClientsTable for duplicate detection and reply caching#3023

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

feat(consensus): add ClientsTable for duplicate detection and reply caching#3023
krishvishal wants to merge 2 commits intoapache:masterfrom
krishvishal:client-table

Conversation

@krishvishal
Copy link
Copy Markdown
Contributor

  • Adds ClientsTable to the consensus layer implementing the VSR client-table ( based on VR Revisited, Section 4, Figure 2) for duplicate request detection and reply caching
  • Integrates into on_request (both metadata and partitions planes) to check for duplicate/stale requests before entering the consensus pipeline
  • Integrates into on_ack to cache committed replies for re-sending on duplicates
  • Deterministic eviction by oldest committed request when max_clients (8192) is exceeded

Closes #3022

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 61.84211% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.74%. Comparing base (411a697) to head (5ce819d).

Files with missing lines Patch % Lines
core/metadata/src/impls/metadata.rs 0.00% 24 Missing ⚠️
core/partitions/src/iggy_partitions.rs 0.00% 24 Missing ⚠️
core/consensus/src/clients_table.rs 93.00% 3 Missing and 4 partials ⚠️
core/consensus/src/impls.rs 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             master    #3023    +/-   ##
==========================================
  Coverage     71.74%   71.74%            
  Complexity      943      943            
==========================================
  Files          1121     1122     +1     
  Lines         93800    93946   +146     
  Branches      71124    71282   +158     
==========================================
+ Hits          67301    67406   +105     
- Misses        23863    23883    +20     
- Partials       2636     2657    +21     
Components Coverage Δ
Rust Core 72.36% <61.84%> (+<0.01%) ⬆️
Java SDK 62.30% <ø> (ø)
C# SDK 67.43% <ø> (-0.21%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.40% <ø> (+0.09%) ⬆️
Go SDK 38.68% <ø> (ø)
Files with missing lines Coverage Δ
core/consensus/src/impls.rs 42.25% <25.00%> (-0.24%) ⬇️
core/consensus/src/clients_table.rs 93.00% <93.00%> (ø)
core/metadata/src/impls/metadata.rs 15.61% <0.00%> (-1.33%) ⬇️
core/partitions/src/iggy_partitions.rs 0.00% <0.00%> (ø)

... and 24 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.

pub struct ClientEntry {
/// The request number of the most recent committed request.
pub request: u64,
/// The cached reply for that request (header + body).
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.

Add an Notify primitive, to notify awaiting client that the respones is ready

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.

Clients table implementation from VSR paper, for sending the response

2 participants