Skip to content

feat(server): dedup partition writes with per-group client table slices - #3959

Merged
numinnex merged 12 commits into
masterfrom
rework_clients_table_one_more_time
Sep 3, 2026
Merged

feat(server): dedup partition writes with per-group client table slices#3959
numinnex merged 12 commits into
masterfrom
rework_clients_table_one_more_time

Conversation

@numinnex

Copy link
Copy Markdown
Contributor

Implement deduplication for partition plane operations.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Aug 24, 2026
@numinnex

Copy link
Copy Markdown
Contributor Author

Merge after #3958

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.50332% with 100 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.01%. Comparing base (e77ee39) to head (949160c).

Files with missing lines Patch % Lines
core/shard/src/lib.rs 76.25% 35 Missing and 3 partials ⚠️
core/partitions/src/iggy_partitions.rs 37.93% 18 Missing ⚠️
core/partitions/src/iggy_partition.rs 90.47% 11 Missing and 1 partial ⚠️
core/partitions/src/state_transfer.rs 93.82% 5 Missing and 6 partials ⚠️
core/server/src/dispatch/partition.rs 80.76% 9 Missing and 1 partial ⚠️
core/consensus/src/client_table.rs 98.87% 2 Missing and 2 partials ⚠️
core/consensus/src/lib.rs 0.00% 3 Missing ⚠️
core/shard/src/router.rs 66.66% 1 Missing and 1 partial ⚠️
core/consensus/src/impls.rs 96.29% 0 Missing and 1 partial ⚠️
core/simulator/src/lib.rs 98.83% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3959       +/-   ##
=============================================
- Coverage     85.10%   73.01%   -12.09%     
  Complexity     1402     1402               
=============================================
  Files          1236     1235        -1     
  Lines        181699   166022    -15677     
  Branches     148003   132330    -15673     
=============================================
- Hits         154629   121218    -33411     
- Misses        23047    40807    +17760     
+ Partials       4023     3997       -26     
Components Coverage Δ
Rust Core 70.63% <90.50%> (-15.48%) ⬇️
Java SDK 67.29% <ø> (ø)
C# SDK 76.33% <ø> (ø)
Python SDK 90.06% <ø> (ø)
PHP SDK 85.65% <ø> (ø)
Node SDK 96.24% <ø> (+1.73%) ⬆️
Go SDK 69.35% <ø> (+0.06%) ⬆️
Files with missing lines Coverage Δ
core/configs/src/server_config/defaults.rs 100.00% <100.00%> (ø)
core/configs/src/server_config/partition.rs 96.49% <100.00%> (+0.61%) ⬆️
core/server/src/boot/recovery.rs 95.96% <ø> (ø)
core/server/src/http/session.rs 95.54% <100.00%> (-0.14%) ⬇️
core/server/src/http/state.rs 88.42% <100.00%> (ø)
core/server/src/http/submit.rs 87.80% <100.00%> (-0.14%) ⬇️
core/server/src/partition_helpers.rs 72.56% <100.00%> (+0.07%) ⬆️
core/shard/src/metrics.rs 86.55% <ø> (ø)
core/consensus/src/impls.rs 91.50% <96.29%> (+0.06%) ⬆️
core/simulator/src/lib.rs 97.03% <98.83%> (+0.01%) ⬆️
... and 8 more

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

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

If you need a review, please ensure CI is green and the PR is rebased on the latest master. Don't hesitate to ping the maintainers - either @core on Discord or by mentioning them directly here on the PR.

Thank you for your contribution!

@github-actions github-actions Bot added the S-stale Inactive issue or pull request label Sep 1, 2026
@numinnex

numinnex commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot removed the S-stale Inactive issue or pull request label Sep 1, 2026

@hubcio hubcio left a comment

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.

items on lines outside the diff:

  • no shipped SDK preserves its client id across a reconnect and HTTP mints a fresh request id per call, so nothing reaches the dedup today - the PR body should say so and link the SDK follow-up.
  • purge in iggy_partition.rs clears offsets, caches and consumer offsets but not the dedup slice, while converge_to_empty_after_failed_install clears it for the same reason. clear it in purge too.
  • the decode_section byte-guard comment in state_transfer.rs is stale now that the dedup section follows: an over-stated group count fails as NonAscendingId or TrailingBytes instead of Truncated. fix the comment or subtract the trailing sections' minimum.

Comment thread core/partitions/src/iggy_partition.rs
Comment thread core/consensus/src/client_table.rs Outdated
Comment thread core/consensus/src/client_table.rs Outdated
Comment thread core/server/src/http/submit.rs Outdated
Comment thread core/partitions/src/iggy_partition.rs
Comment thread core/consensus/src/client_table.rs Outdated
Comment thread core/consensus/src/client_table.rs Outdated
Comment thread core/consensus/src/impls.rs
Comment thread core/consensus/src/client_table.rs Outdated
Comment thread core/consensus/src/client_table.rs Outdated
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Sep 1, 2026
@numinnex

numinnex commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Sep 2, 2026

@hubcio hubcio left a comment

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.

round 2 only fixed the doctest link, so most of round 1 still stands. two findings have no line in the diff to hang on:

ShardZeroCoordinator::seed_client_sequence in core/shard/src/coordinator.rs only ever raises the counter, and it seeds from live metadata ids at boot - a logged-out id is already gone from the table by then. so after a restart the same user can be handed the same client id while a peer primary still holds that id's slice watermark, and the first writes come back 201 without being written. minting ids that never repeat (boot nonce or view in the upper bits) closes it without touching the slice.

the PR body is still one line. worth saying which SDKs this reaches and what a client sees when a write is refused.

separate from this PR: the scripts/ci/storage-compat.sh fix in 85aa01e is ok.

Comment thread core/consensus/src/client_table.rs
Comment thread core/consensus/src/client_table.rs Outdated
Comment thread core/configs/src/server_config/partition.rs Outdated
Comment thread core/partitions/src/state_transfer.rs
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Sep 2, 2026
@numinnex

numinnex commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Sep 2, 2026
@numinnex
numinnex merged commit bad22c0 into master Sep 3, 2026
164 of 169 checks passed
@numinnex
numinnex deleted the rework_clients_table_one_more_time branch September 3, 2026 08:36
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Sep 3, 2026
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.

4 participants