Repository navigation
Conversation
Checks every SyncIndexer backend the same way, behind one plug-in trait (HarnessBackend) and one suite macro (harness_suite!): - A randomized differential test against a clean-room set-semantics reference written from Dynamo's event semantics. Streams cover two to eight ranks per tree, per-rank Cleared, remove_worker and remove_worker_dp_rank, tail-first, head-first and shuffled multi-hash removals, and partial re-stores. Each stream runs on a serial event lane (checked after every operation) and through ThreadPoolIndexer with 1 and 4 pipelined lanes (checked at quiescent checkpoints). Overcounts fail; undercounts are split into hole undercounts, which Dynamo allows, and unexplained ones, which fail too. Seeds come from HARNESS_SEEDS (40 by default) or HARNESS_SEED, and the earliest overcounts are shrunk to a minimal engine-valid event list. - The #15614 race soak, adapted to drive any backend through its own SyncIndexer::worker lanes, keeping the overcount, last-hash, parity and apply-error checks, strict and chaos modes, and the churn and slot-offset knobs. - A self-test: both must fail on a backend that drops removals. - An indexer_memory bench that counts live heap bytes with a counting global allocator and reports bytes per (rank, block) membership, time-averaged over evenly spaced points of a Mooncake replay. On ConcurrentRadixTreeCompressed at this base the differential finds the grouped-removal overcount and shrinks it to five events: store [b1 b2 b3]; store [b4] under b1; remove [b1]; store [b1 b2]; remove [b3 b2] -> [b1 b2] scores 2, true 1 known_grouped_removal_overcount replays it, and the six-event form that splits the restore in two (scores 3 for a true 2), through all three drivers. Written without reading SMG sources. Signed-off-by: PeaBrane <yanrpei@gmail.com>
Contributor
✅ Dynamo PR CI passed — run 37987268462 (attempt 1) on
|
… harness Signed-off-by: PeaBrane <yanrpei@gmail.com>
This branch has not been deployed
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.
Status (2026-10-09). John Thomson is taking this over. Draft, not for merge as is: it is the shared correctness and memory gate for the follow-up indexer redesign exploration (branches
rupei/crtc-volume-sweep,rupei/kv-arena-seqlockandrupei/kv-arena-lanes, which stack on this branch). Background and the decision rule are in the handoff gist'sfollowups-2026-10-09.md.Summary
One harness that any
SyncIndexerbackend plugs into with a single macro line, so CRTC and candidate replacements are gated by the same checks.lib/kv-router/src/indexer/harness/).HARNESS_STRICT=1(the default).Cleared,remove_workerandremove_worker_dp_rank, tail-first, head-first and shuffled multi-hash removals, partial re-stores, chained stores, shared decode extensions, edges longer than 16 blocks, and workers returning under the same or a fresh id.ThreadPoolIndexerwith 1 and 4 pipelined lanes checked at quiescent checkpoints.soak.rs): the test(kv-router): add an opt-in CRTC race soak #15614 soak adapted to drive any backend through its ownSyncIndexer::workerlanes, keeping its overcount, hash-mismatch, parity and apply-error checks, strict and chaos modes, andSOAK_*knobs.selftest.rs): a wrapper backend that drops every removal must fail both the differential and the strict soak.lib/bench/kv_router/indexer_memory.rs): bytes per (rank, block) membership over a replay through a counting global allocator, averaged over 100 evenly spaced points, plus final, after-sweep and peak values.--sweeps 12runs the backend's cleanup at CRTC's five-minute cadence over a 60-minute trace.--features indexer-memory-system-alloccounts over the system allocator instead of jemalloc.Plugging in a backend:
Optional hooks:
harness_match_details(hash-mismatch check),harness_rank_slot(recycled-slot counting in the soak) andharness_structure_size.Outside the new files this touches one line each in
indexer/mod.rsandconcurrent_radix_tree_compressed/mod.rs, addsharness_impl.rsfor CRTC, and adds the bench entry and feature inlib/bench/Cargo.toml.Validation
known_grouped_removal_overcountreplays it, and the 6-event form scores 3 for a true 2 under all three drivers. The fix is going onto perf(kv-router): cut CRTC writer per-block work #15611.Base:
rupei/campaign-smg-ideas-20261009, which is the #15611 stack plus the linked-in jemalloc from closed #15606. The memory bench's default counting allocator wraps jemalloc, hence that base.