{
  "slug": "spandb",
  "term": "SpanDB",
  "aliases": [],
  "definition": "SpanDB is a research RocksDB extension that places its write-ahead log and selected LSM-tree levels on a fast NVMe SSD while retaining bulk data on cheaper storage.",
  "note": "Placement changes redirect newly created SST files, so the configured level boundary need not describe every existing file's location. The speed disk is a storage tier, not merely a disposable cache. [spandb-paper]\n\nAt revision 9a82d5a5, the logger polls SPDK completions before publishing completed log requests. Its callback terminates the process on a device-reported I/O error; submission return and completion are different observations. [spandb-code]\n\nDeployment requires deliberate device binding and hugepage allocation for the prototype's cache. This is not an ordinary RocksDB configuration switch. [spandb-readme]\n\nFor the active log, the pinned reader treats a page whose tag differs from the expected log tag as an end marker; older logs have recorded end addresses. Page membership is not payload integrity. [spandb-recovery]\n\nLogEntry::Check compares the assembled byte count with the declared entry size; it does not calculate a checksum. SPDKLoggingRecover passes reconstructed bytes to WriteBatch, whereas the ordinary file-log recovery path constructs a checksum-enabled log::Reader. Do not assume the two readers perform identical validation. This is a source-level distinction, not a measured corruption outcome. [spandb-entry-check] [spandb-replay]\n\nCreateWAL records the preceding log's end address, and DeleteLog removes obsolete log descriptors before writing metadata. A matching page tag does not itself authorize reclamation. [spandb-metadata]",
  "status": "research",
  "advantages": [],
  "limitations": [
    {
      "text": "Log-page reuse relies on the paper's atomic 4 KiB write assumption; this is not a guarantee for every NVMe device.",
      "citationIds": [
        "spandb-paper"
      ]
    }
  ],
  "related": [
    "lsm-tree",
    "io-completion-polling"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-14",
  "citations": [
    {
      "id": "spandb-paper",
      "title": "Chen, Ruan, Li, Ma and Xu. SpanDB. USENIX FAST 2021, pp. 17-32, sections 3-5.",
      "url": "https://www.usenix.org/system/files/fast21-chen-hao.pdf",
      "accessed": "2026-11-14"
    },
    {
      "id": "spandb-code",
      "title": "SpanDB 9a82d5a5: SPDKWrite callback and logger completion processing, lines 98-244.",
      "url": "https://github.com/SpanDB/SpanDB/blob/9a82d5a5ffef05ad7ccaa92ca539136509bbff6c/ssdlogging/spdk_logging_server.cc#L98-L244",
      "accessed": "2026-11-14"
    },
    {
      "id": "spandb-readme",
      "title": "SpanDB 9a82d5a5: author artifact setup, hugepage budget and test configuration.",
      "url": "https://github.com/SpanDB/SpanDB/blob/9a82d5a5ffef05ad7ccaa92ca539136509bbff6c/README.md",
      "accessed": "2026-11-14"
    },
    {
      "id": "spdk-driver",
      "title": "SPDK NVMe driver: asynchronous submission, queue-pair ownership and multi-process limitations.",
      "url": "https://spdk.io/doc/nvme.html",
      "accessed": "2026-11-14"
    },
    {
      "id": "spandb-recovery",
      "title": "SpanDB 9a82d5a5: active-log tag checks and entry assembly in ReadFromSPDK and ProcessData.",
      "url": "https://github.com/SpanDB/SpanDB/blob/9a82d5a5ffef05ad7ccaa92ca539136509bbff6c/ssdlogging/spdk_logging_recovery.cc",
      "accessed": "2026-11-14"
    },
    {
      "id": "spandb-entry-check",
      "title": "SpanDB 9a82d5a5: LogEntry::Check compares accumulated and declared byte counts.",
      "url": "https://github.com/SpanDB/SpanDB/blob/9a82d5a5ffef05ad7ccaa92ca539136509bbff6c/ssdlogging/spdk_logging_recovery.h#L71-L96",
      "accessed": "2026-11-14"
    },
    {
      "id": "spandb-replay",
      "title": "SpanDB 9a82d5a5: SPDKLoggingRecover and ordinary RecoverLogFiles use different input readers.",
      "url": "https://github.com/SpanDB/SpanDB/blob/9a82d5a5ffef05ad7ccaa92ca539136509bbff6c/db/db_impl/db_impl_open.cc",
      "accessed": "2026-11-14"
    },
    {
      "id": "spandb-metadata",
      "title": "SpanDB 9a82d5a5: DeleteLog, CreateWAL and WriteMetadata lifecycle.",
      "url": "https://github.com/SpanDB/SpanDB/blob/9a82d5a5ffef05ad7ccaa92ca539136509bbff6c/ssdlogging/spdk_logging_server.cc#L309-L384",
      "accessed": "2026-11-14"
    }
  ],
  "provenance": [
    "Primary-source synthesis and pinned-code inspection on 2026-11-14. No SpanDB execution, benchmark reproduction or power-loss test."
  ]
}
