Part of #8404 (AOF MVP). Design: Architecture, Appending and sealing.
A new JournalConsumerInterface, one per shard, that turns journal records into blocks for
AofSegmentWriter.
Scope:
--aof (alias appendonly) and --aof_name. Refuse to start with --proactor_type=epoll, a
remote --dir, or --hz <= 0 (or add an AOF flush timer instead).
- Start the journal on the shard (
journal::StartInThread()) before RegisterConsumer, because a
standalone node has no journal otherwise.
ConsumeJournalChange: append to the open block without preempting.
ThrottleIfNeeded: seal at kAofBlockBytes, and apply backpressure against
--aof_max_buffered_bytes (queued, retrying and in-flight buffers), like BufferedSocketWriter.
- Seal the open block at the very top of
EngineShard::Heartbeat(), before its skip checks.
Depends on: #8407.
Done when: small records share a block until the size limit or the heartbeat; the heartbeat
seals even when it skips its other work; a standalone node's writes reach the AOF.
Open edge cases to settle: should backpressure ever give up instead of stalling the shard?
Verify that no DisableFlushGuard section can span a heartbeat.
Part of #8404 (AOF MVP). Design: Architecture, Appending and sealing.
A new
JournalConsumerInterface, one per shard, that turns journal records into blocks forAofSegmentWriter.Scope:
--aof(aliasappendonly) and--aof_name. Refuse to start with--proactor_type=epoll, aremote
--dir, or--hz <= 0(or add an AOF flush timer instead).journal::StartInThread()) beforeRegisterConsumer, because astandalone node has no journal otherwise.
ConsumeJournalChange: append to the open block without preempting.ThrottleIfNeeded: seal atkAofBlockBytes, and apply backpressure against--aof_max_buffered_bytes(queued, retrying and in-flight buffers), likeBufferedSocketWriter.EngineShard::Heartbeat(), before its skip checks.Depends on: #8407.
Done when: small records share a block until the size limit or the heartbeat; the heartbeat
seals even when it skips its other work; a standalone node's writes reach the AOF.
Open edge cases to settle: should backpressure ever give up instead of stalling the shard?
Verify that no
DisableFlushGuardsection can span a heartbeat.