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
139612: requestbatcher: batch requests per-AC priority r=arulajmani a=arulajmani
Previously, the batcher would batch requests to a given range together, and merge AC headers to pick the most permissive. This meant that lower priority AC work could get bumped to higher priority. This patch prevents this by batching per-range, per-AC priority.
There's some ugliness here around requests that bypass AC entirely. They do so by setting the Source field; to ensure these are batched correctly, we bucket them separately.
Closes#136029
Release note: None
147469: stateloader: untangle SynthesizeRaftState r=pav-kv a=pav-kv
This PR starts untangling the opaque code in `SynthesizeHardState` and `SynthesizeRaftState`, with the goals of (a) making it simple, (b) decoupling log and state machine reads/writes. Right now, these funcs are used in exactly 2 cases:
1. during cluster bootstrap, for creating the initial set of ranges
2. when applying a split trigger, for initializing the RHS (which is uninitialized and only possibly can have a `HardState`)
In both cases, the replica's state machine and log are initialized at `RaftInitialLogIndex/Term`. This means that everything these funcs generate is mostly based on constants (modulo the `HardState` in case 2). But it is really hard to tell by reading it. After this PR, case (1) is decoupled into its own `WriteInitialRaftState` func, and directly produces the right output. The "synthesize" funcs are now only used by splits, and can be further simplified in follow-up PRs.
The first half of this PR adds a datadriven test for `WriteInitialRangeState` showing the state of a typical replica created at cluster bootstrap. The printout only includes `RangeID`-local state, and no user space keys. The test helps ensuring that subsequent commits are no-ops.
Epic: CRDB-49111
Co-authored-by: Arul Ajmani <[email protected]>
Co-authored-by: Pavel Kalinnikov <[email protected]>
0 commit comments