Skip to main content

Module tail_replay

Module tail_replay 

Source
Expand description

Background replay of the pending WAL tails of a region into SSTs.

StructsΒ§

ChunkReservation πŸ”’
The pool memory a chunk uses above its floor. It is released on drop.
TailReplayEndGuard πŸ”’
Reports the end of a tail replay to the worker, however the task ends.
TailReplayLimits πŸ”’
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.
TailReplayMemory πŸ”’
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.
TailReplayTask πŸ”’
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_FACTOR of the global write buffer size.

FunctionsΒ§

notify_worker πŸ”’
Sends notify about the region region_id to its worker.
release_wal_to_replay_start πŸ”’
Releases the WAL of region on node node_id up 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 region are to be replayed: it has some and can replay them.