Skip to main content

Module switchover_buffer

Module switchover_buffer 

Source
Expand description

Switchover Buffer - Query buffering during controlled switchover

Buffers write queries during the brief switchover window to ensure zero transaction loss. Queries are replayed to the new primary once switchover completes.

§How it works

Normal Operation:
  Client → Proxy → Primary

During Switchover:
  Client → Proxy → Buffer (queued)
                     ↓
  [Switchover completes]
                     ↓
           Buffer → New Primary (replayed)

§Timeout Behavior

If switchover takes longer than buffer_timeout, buffered queries will fail with a timeout error rather than blocking indefinitely.

Structs§

BufferConfig
Buffer configuration
BufferStatsSnapshot
Statistics snapshot
BufferedQuery
A buffered query waiting to be executed
SwitchoverBuffer
Switchover buffer for zero-downtime primary transitions

Enums§

BufferResult
Result of a buffered query after replay
BufferState
Buffer state