Skip to content

AOF: manifest, bootstrap and garbage collection #8409

Description

@romange

Part of #8404 (AOF MVP). Design: Manifest, Bootstrap.

Scope:

  • Manifest file: version, shard_count, checkpoint id, the base's path and format, whether the base
    is AOF-owned, cut_time_ms, per-shard cut_seq / cut_lsn, and a bootstrapping state.
    Replaced atomically (temp file, fsync, rename, dir fsync).
  • Startup precedence: with a manifest, load the base it names and ignore --dbfilename for loading.
  • Bootstrap: allowed only when --dir has no AOF files. Write the bootstrapping manifest first,
    adopt the loaded --dbfilename dump as the first base (cut = first LSN, cut_time_ms = load
    time), and switch to ACTIVE only after the manifest commits.
  • Garbage collection: delete segments below cut_seq and superseded AOF-owned bases, never user
    dumps. At startup, delete AOF files the manifest does not reference.

Done when: tests cover atomic replacement, an interrupted bootstrap, and a missing manifest with
AOF files present (startup fails instead of loading --dbfilename).

Open edge cases to settle: the manifest grammar; whether the manifest records the adopted
dump's identity, in case it is replaced during bootstrap.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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