You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce `WithDistReadRepairBatch(interval, maxBatchSize)` option that
routes quorum-read repair fan-out through an async coalescing queue
(`repairQueue` in pkg/backend/dist_read_repair.go).
Repairs are queued by destination peer + key, retaining only the
highest-version entry per (peer, key) — last-write-wins by version,
tie-broken by origin. Concurrent reads of the same hot key produce one
repair, not N; each collapsed duplicate bumps the new
`dist.read.repair.coalesced` metric. The background flusher dispatches
per-peer batches on the configured interval or when a peer's pending
count hits `maxBatchSize`, using errgroup for parallel ForwardSet calls.
`Stop()` drains the queue before returning; crash exit loses queued
repairs by design, with merkle anti-entropy as the convergence safety net.
Drop the defensive ForwardGet probe from `repairRemoteReplica`:
every repair is now a single unconditional ForwardSet. The receiver's
`applySet` already version-compares and noops downgrades, making the
probe pure duplication (~50 % wire-call reduction per repair, independent
of whether batching is enabled).
New OTel metrics:
- `dist.read.repair.batched` — ForwardSet calls dispatched by the flusher
- `dist.read.repair.coalesced` — duplicate (peer, key) enqueues collapsed
Eight unit tests (pkg/backend/dist_read_repair_test.go) cover coalesce
semantics, distinct-peer independence, parallel per-peer flush,
nil-transport noop, size-threshold inline flush, stop-drain guarantee,
isHigherVersion tie-break, and concurrent-enqueue race-safety.
Three integration tests (tests/hypercache_distmemory_readrepair_batch_test.go)
drive a 3-node RF=3 Quorum cluster end-to-end.
Also:
- Refactor Stop() stop-channel teardown into closeBackgroundLoops()
- Fix Makefile pre-commit target: guard pyenv activation with command -v
- Add golang.org/x/sync v0.20.0 (errgroup); bump shamaton/msgpack to v3.1.1
- Add cspell words: amortisation, coalescer, distmemory, errgroup, readrepair
- Document batching option in docs/operations.md under Tuning — read-repair batching
0 commit comments