fn wal_writer_thread_main(
wal_state: WalState,
rx: Receiver<WalWriterMessage>,
replication_tx: Sender<ReplicationMessage>,
rsm_state: RsmWalWriterState,
)Expand description
Dedicated WAL writer OS thread.
Owns WalState exclusively (no Arc/Mutex). Receives batches from the batcher
task, writes to page cache, performs fsync (io_uring on Linux, sync_data elsewhere),
fires durability acks, and enqueues records for async replication.