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
156586: mmaprototype: improve modeling of pending changes r=tbg a=sumeerbhola
The goal was to fix a known bug where in a multi-store setting where a range (and lease) is being moved from one local store to another local store, under a partial undo case we could end up with 2 leaseholders in the internal state of the allocator.
As part of fixing this, we elaborate on why we are modeling a single "decision" as a set of pending pendingReplicaChanges, one per replica, and the modeling deficiencies. To address the bug, we sacrifice the universal undo behavior of a pendingReplicaChange. Instead, once some subset of changes on a range are seen to be enacted, we set a no-rollback bit on the rangeState for the remaining set of pendingReplicaChanges. These can no longer be undone, and must only be discarded or considered subsumed. This discarding behavior happens when processing a new StoreLeaseholderMsg.
As part of this change, we also shorten the GC duration of the remaining pending changes once some subset has been observed to be enacted. This should be generally beneficial, since for range moves it is the first change (replica addition) that is time consuming, and is what caused us to have a slow (5min) GC duration.
Informs #156754
Epic: CRDB-55052
Release note: None
Co-authored-by: sumeerbhola <[email protected]>
Co-authored-by: Tobias Grieger <[email protected]>
0 commit comments