MultiLog replication: drift-barrier throttling, inline tail-witness pulses, and AOF shipping backpressure - #2003
Draft
vazois wants to merge 13 commits into
Draft
MultiLog replication: drift-barrier throttling, inline tail-witness pulses, and AOF shipping backpressure#2003vazois wants to merge 13 commits into
vazois wants to merge 13 commits into
Conversation
vazois
force-pushed
the
vazois/mlog-updates
branch
from
August 1, 2026 04:00
41e8771 to
4905ecd
Compare
vazois
force-pushed
the
vazois/mlog-updates
branch
2 times, most recently
from
August 1, 2026 20:22
a94875b to
f08ce8a
Compare
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.
Summary
This branch reworks MultiLog (sharded AOF) replication with an end-to-end backpressure/throttling model:
ReplayAlignBarrierdriven by the read-consistency manager, replacing the previous throttle-driver mechanism.CLUSTER ADVANCE_TIMEpulses directly fromAofSyncTask(rate-limited byAofTailWitnessFreqMs), and the replica routes them to the owningReplicaReplayDriver.AofBackpressuregate stalls primary appenders when a replica lags, so an in-memory AOF cannot recycle unshipped pages.Key changes
libs/server/AOF/AofBackpressure.cs(new) — conservative per-sublog backpressure gate. Appenders self-checktail - shippedWatermarkagainst a per-sublog budget; the shipping side publishes a min-shipped watermark. A stale watermark only over-estimates lag, so it is fail-safe.GarnetLog/GarnetAppendOnlyFile— gate wired into every append path before sublog locks.AofSyncDriverStore/AofSyncTask— publish min-shipped watermark on ship (byte-progress gated) and on driver-set changes.ReadConsistencyManager/ReplayAlignBarrier— reader-side alignment barrier andAdvanceVirtualSublogTimepulse application.ReplicationManager,TaskType,AofSyncDriver).New configuration
AofSyncBackpressureMaxLagBytes--aof-sync-backpressure-max-lag-bytes-1disabled.AofReplayBarrierSpinUs--aof-replay-barrier-spin-us2912796("ONLY FOR TESTING") bumpsAofAddress.MaxSublogCount4 → 64 — drop/revert or intentionally keep before merge.dotnet format --verify-no-changes.Draft — not ready for merge.