Repository navigation
cluster-mode: serialize topology print; flag staircase fan-out - #491
Merged
Merged
Conversation
Follow-up to #489 addressing two Cursor Bugbot findings (also raised on the 2.4 backport #490): - Hold the print-gate mutex across the whole topology emit so two workers can't interleave blocks or print a superseded topology after a newer one (previously the lock was released before the fprintf block). - With the --clients-start staircase ramp, label Total connections / rate-limit target as 'at full ramp' (cfg.clients is the peak value), so the figure isn't read as the count already opened. Co-Authored-By: Claude Opus 4.8 <[email protected]>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
fcostaoliveira
added a commit
that referenced
this pull request
Jun 25, 2026
…ort) (#490) Backport of #489 (+ #491 fixes) to 2.4, re-implemented against 2.4's primary-only cluster model (m_slot_to_shard[16384]). Reports discovered endpoint count, total connection fan-out, and aggregate rate-limit target at benchmark start and in the results summary (text + JSON). Also enables the full CI matrix for the 2.4 branch.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #489 addressing two Cursor Bugbot findings (also fixed on the 2.4 backport #490):
print_topology_summary()released the print-gate mutex before writing the topology block, so two workers could interleave their blocks or emit a superseded topology after a newer one. The lock is now held across the entire emit.--clients-start,cfg.clientsis the peak (full-ramp) value, soTotal connections/ aggregate rate overstated the fan-out if the ramp didn't complete. Both the startup block and the results summary now label these "at full ramp" when staircase is in use.No functional change to the numbers outside staircase mode.
🤖 Generated with Claude Code
Note
Low Risk
Logging synchronization and output labeling only; no change to connection math or routing behavior outside clarified reporting.
Overview
Topology logging —
print_topology_summary()no longer releases the process-global print gate mutex after updating(run id, signature); the lock stays held through the entire stderr emit (endpoint list, total connections, rate limit) and unlocks at the end. That stops worker threads from interleaving blocks or printing an older topology after a newer one.Staircase ramp clarity — When
--clients-startis set,clientsis the peak connection count, not necessarily what is open mid-ramp. Startup topology output (cluster_client.cpp) and the run results summary (memtier_benchmark.cpp) append " at full ramp" to total-connection and aggregate rate-limit lines so those figures read as targets, not live counts. Numbers are unchanged when staircase mode is off.Reviewed by Cursor Bugbot for commit 1b57a3c. Bugbot is set up for automated code reviews on this repo. Configure here.