{
  "slug": "rocksdb-read-snapshot",
  "term": "RocksDB read snapshot",
  "aliases": [
    "RocksDB snapshot",
    "GetSnapshot"
  ],
  "definition": "A RocksDB read snapshot is a handle selecting a point-in-time read view within a running database.",
  "note": "In the same database, set ReadOptions::snapshot to the acquired handle for reads of that view. GetSnapshot can return null; release a successful handle with ReleaseSnapshot when it is no longer needed, and do not reuse it afterward. [snapshot-api]\n\nThe view does not survive database restart. With snapshot-preserving settings, flush and compaction retain versions needed by active snapshots, rather than guaranteeing retention of specific SST filenames. It is not a checkpoint directory or a backup. [snapshot-doc]\n\nWith unordered_write=true, pending lower-sequence writes may become visible after acquisition. Application compaction filters can change or remove snapshot-visible data. Both weaken an unconditional immutable-view assumption. [options] [compaction-filter]",
  "related": [
    "rocksdb-checkpoint",
    "rocksdb-backup-engine",
    "rocksdb-column-family",
    "compaction",
    "lsm-tombstone",
    "snapshot"
  ],
  "citations": [
    {
      "id": "snapshot-api",
      "title": "RocksDB v10.10.1. db.h: GetSnapshot and ReleaseSnapshot.",
      "url": "https://github.com/facebook/rocksdb/blob/v10.10.1/include/rocksdb/db.h",
      "accessed": "2026-10-17"
    },
    {
      "id": "snapshot-doc",
      "title": "RocksDB project. Snapshot: lifetime, read visibility and compaction retention.",
      "url": "https://github.com/facebook/rocksdb/wiki/Snapshot",
      "accessed": "2026-10-17"
    },
    {
      "id": "hesela",
      "title": "Hesela: RocksDB capture and recovery boundaries.",
      "url": "https://hesela.com/analyses/rocksdb-wal-flush-manifest-boundaries/#capture-boundaries",
      "accessed": "2026-10-17"
    },
    {
      "id": "options",
      "title": "RocksDB v10.10.1. options.h: buffering, atomic flush, write policy and snapshot immutability.",
      "url": "https://github.com/facebook/rocksdb/blob/v10.10.1/include/rocksdb/options.h",
      "accessed": "2026-10-17"
    },
    {
      "id": "compaction-filter",
      "title": "RocksDB v10.10.1. compaction_filter.h: snapshot-visible data caveat.",
      "url": "https://github.com/facebook/rocksdb/blob/v10.10.1/include/rocksdb/compaction_filter.h",
      "accessed": "2026-10-17"
    }
  ],
  "provenance": [
    "API scope: ordinary RocksDB read snapshots, with v10.10.1 header and project Snapshot documentation; not a claim of distributed snapshot coordination."
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-17"
}
