{
  "slug": "rocksdb-wal-tracking",
  "term": "RocksDB WAL tracking",
  "aliases": [
    "track_and_verify_wals_in_manifest"
  ],
  "definition": "RocksDB WAL tracking records log metadata so recovery can detect missing or incomplete logs that checksums on surviving records alone cannot identify.",
  "note": "The MANIFEST-based design cannot infer loss from gaps in WAL filenames because other file types share the number sequence; enabling it later does not validate old untracked WALs. [design]\n\nFor v10.10.1, track_and_verify_wals_in_manifest defaults to false, tracks synchronized closed WALs rather than live-WAL syncs, and excludes secondary instances. The separate track_and_verify_wals option is experimental, also defaults to false, and has a RepairDB compatibility warning. [options]\n\nWalSet::CheckWals skips entries without a recorded synced size and rejects a missing file or one shorter than that size. Equality or extra bytes pass this comparison, not all recovery checks; it is not a content checksum. [implementation]\n\nDuring ordinary recovery the check precedes WAL replay. best_efforts_recovery bypasses it, and reopening with MANIFEST tracking off clears the previously tracked WAL metadata. Disabling the check does not repair missing data. [open]",
  "related": [
    "rocksdb-manifest",
    "write-ahead-log",
    "checksum"
  ],
  "citations": [
    {
      "id": "design",
      "title": "RocksDB project. Track WAL in MANIFEST: design and upgrade limitations.",
      "url": "https://github.com/facebook/rocksdb/wiki/Track-WAL-in-MANIFEST",
      "accessed": "2026-10-18"
    },
    {
      "id": "options",
      "title": "RocksDB v10.10.1. DBOptions: two distinct WAL-tracking mechanisms.",
      "url": "https://github.com/facebook/rocksdb/blob/v10.10.1/include/rocksdb/options.h#L614",
      "accessed": "2026-10-18"
    },
    {
      "id": "implementation",
      "title": "RocksDB v10.10.1. WalSet::CheckWals: synced-size, presence and lower-bound checks.",
      "url": "https://github.com/facebook/rocksdb/blob/v10.10.1/db/wal_edit.cc#L157",
      "accessed": "2026-10-18"
    },
    {
      "id": "open",
      "title": "RocksDB v10.10.1. DB recovery: WAL inventory check, best-efforts bypass and tracking disablement.",
      "url": "https://github.com/facebook/rocksdb/blob/v10.10.1/db/db_impl/db_impl_open.cc#L716",
      "accessed": "2026-10-18"
    },
    {
      "id": "hesela",
      "title": "RocksDB: who notices a missing WAL?",
      "url": "https://hesela.com/analyses/rocksdb-wal-flush-manifest-boundaries/#wal-inventory",
      "accessed": "2026-10-18"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-18"
}
