Expand description
Background replay of the pending WAL tails of a region into SSTs.
StructsΒ§
- Chunk
Reservation π - The pool memory a chunk uses above its floor. It is released on drop.
- Tail
Replay πEndGuard - Reports the end of a tail replay to the worker, however the task ends.
- Tail
Replay πLimits - Bounds the tail replays of a node. They take none of the flush permits, while their chunk memtables still count in the global write buffer.
- Tail
Replay πMemory - Memtable memory of the replay chunks on a node, out of a
budget. The chunks share a pool of half the budget above their floors, and each of the MAX_CONCURRENT_TAIL_REPLAYS replays may always use a floor of an equal share of the other half. - Tail
Replay πTask - Replays the pending tails of a region into SSTs and publishes them in one manifest edit.
ConstantsΒ§
- CHUNK_
MEMTABLE_ πUSAGE - Memtable usage at which replayed rows are written to SSTs at the latest.
- LEASE_
CHECK_ πINTERVAL - How often a replay checks whether the region received a Leader lease.
- MAX_
BACKOFF π - Longest delay between retries.
- MAX_
CONCURRENT_ πTAIL_ REPLAYS - Replays that read and write at once on a node.
- MIN_
BACKOFF π - Delay before the first retry of a failed round or an unfinished commit.
- TAIL_
REPLAY_ πMEMORY_ FACTOR - The replay chunks of a node may use
1 / TAIL_REPLAY_MEMORY_FACTORof the global write buffer size.
FunctionsΒ§
- notify_
worker π - Sends
notifyabout the regionregion_idto its worker. - release_
wal_ πto_ replay_ start - Releases the WAL of
regionon nodenode_idup to where the region now replays it on open, keeping the nodeβs remaining tails, after an edit of its pending tails or a handoverβs commit, which may record only a handoff floor or nothing. A failure is only logged. - should_
replay_ πtails - Returns whether the pending tails of
regionare to be replayed: it has some and can replay them.