Skip to content

AOF: extract JournalApplier and an end-of-log-aware global-command barrier #8411

Description

@romange

Part of #8404 (AOF MVP). Design: Global-command barrier.

Scope:

  • Extract the apply logic from DflyShardReplica::ExecuteTx into a reusable JournalApplier,
    used by replica stable sync and by AOF replay.
  • Extend MultiShardExecution (tx_executor.cc): the participant count is the number of chains
    that have not reached end of log. A chain at end of log counts as arrived at every barrier and
    wakes the fibers already waiting.
  • Classify every global command journaled on all shards (FLUSH*, FT.CREATE / ALTER / DROPINDEX /
    SYNUPDATE). One-copy records such as MOVE bypass the barrier. IsGlobalCmd only knows FLUSH*
    today.

Done when: replication tests pass unchanged, and unit tests cover the end-of-log wakeup and
MOVE followed by FLUSHALL without deadlock.

Open edge cases to settle: verify the txid lockstep argument in code, or make txids unique
across restarts.

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