Skip to content

AOF: AofStreamer journal consumer and --aof flag #8408

Description

@romange

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions