Skip to content

fix(server-ng): eliminate unnecessary backpressure under concurrent clients#3692

Merged
mmodzelewski merged 10 commits into
masterfrom
fix_metadata_cancel_safe
Jul 20, 2026
Merged

fix(server-ng): eliminate unnecessary backpressure under concurrent clients#3692
mmodzelewski merged 10 commits into
masterfrom
fix_metadata_cancel_safe

Conversation

@numinnex

@numinnex numinnex commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Cancel-safe commits: on_ack now peeks → reads → revalidates → applies
atomically instead of popping before its awaits; a dropped driver (e.g.
canceled HTTP handler) no longer strands committed entries and panics the
shard. HTTP register/logout submit via detached tasks.

Serialized checkpoints: forced checkpoints in on_replicate are gated
single-flight (concurrent drain()s raced the shared wal.tmp rewrite),
and a failed checkpoint no longer drops the prepare — that left a phantom
op that permanently gapped the commit frontier until the pipeline wedged.

Backpressure absorbed, not surfaced: submits arriving while an op is
mid-commit are queued (register, with its reply subscriber riding the
request queue) or simply pipelined (logout / requests, matching the wire
path) instead of bouncing transient NotCaughtUp — which one-shot clients
saw as hard login/logout failures.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.76384% with 176 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.29%. Comparing base (499d8aa) to head (bec3a4f).

Files with missing lines Patch % Lines
core/metadata/src/impls/metadata.rs 86.90% 78 Missing and 4 partials ⚠️
core/server-ng/src/dispatch.rs 77.88% 46 Missing ⚠️
core/server-ng/src/http/submit.rs 0.00% 14 Missing ⚠️
core/server-ng/src/http/state.rs 0.00% 9 Missing ⚠️
core/journal/src/prepare_journal.rs 91.17% 5 Missing and 1 partial ⚠️
core/server-ng/src/bootstrap.rs 0.00% 5 Missing ⚠️
core/configs/src/server_ng_config/displays.rs 0.00% 4 Missing ⚠️
core/configs/src/server_ng_config/metadata.rs 93.33% 4 Missing ⚠️
core/configs/src/server_ng_config/validators.rs 0.00% 2 Missing and 1 partial ⚠️
core/metadata/src/impls/recovery.rs 88.88% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3692       +/-   ##
=============================================
- Coverage     74.06%   60.29%   -13.77%     
  Complexity      937      937               
=============================================
  Files          1301     1301               
  Lines        147464   136412    -11052     
  Branches     123017   112038    -10979     
=============================================
- Hits         109224    82256    -26968     
- Misses        34768    50601    +15833     
- Partials       3472     3555       +83     
Components Coverage Δ
Rust Core 57.46% <83.76%> (-16.83%) ⬇️
Java SDK 62.44% <ø> (ø)
C# SDK 71.04% <ø> (-1.14%) ⬇️
Python SDK 92.17% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 92.40% <ø> (-0.10%) ⬇️
Go SDK 42.87% <ø> (ø)
Files with missing lines Coverage Δ
core/configs/src/server_ng_config/defaults.rs 100.00% <100.00%> (ø)
core/configs/src/server_ng_config/server_ng.rs 47.05% <ø> (ø)
core/consensus/src/impls.rs 75.06% <100.00%> (+0.80%) ⬆️
core/consensus/src/plane_helpers.rs 94.02% <100.00%> (+0.10%) ⬆️
core/shard/src/lib.rs 54.14% <100.00%> (+0.02%) ⬆️
core/configs/src/server_ng_config/validators.rs 72.37% <0.00%> (-0.86%) ⬇️
core/metadata/src/impls/recovery.rs 79.71% <88.88%> (+2.23%) ⬆️
core/configs/src/server_ng_config/displays.rs 0.00% <0.00%> (ø)
core/configs/src/server_ng_config/metadata.rs 93.33% <93.33%> (ø)
core/server-ng/src/bootstrap.rs 11.15% <0.00%> (-0.03%) ⬇️
... and 5 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.

@numinnex numinnex changed the title fix(metadata): fix metadata pipeline commit fix(server-ng): eliminate unnecessary backpressure under concurrent clients Jul 20, 2026
@mmodzelewski
mmodzelewski merged commit 1789610 into master Jul 20, 2026
94 checks passed
@mmodzelewski
mmodzelewski deleted the fix_metadata_cancel_safe branch July 20, 2026 18:20
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Jul 20, 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.

3 participants