{
  "slug": "memtable",
  "term": "Memtable",
  "aliases": [
    "in-memory write buffer (LSM)"
  ],
  "definition": "A memtable is an in-memory structure that holds recent LSM-tree updates before they are flushed to sorted table files.",
  "note": "RocksDB's FAST 2021 architecture description separates the memtable from its recovery WAL and persistent SST files. A memtable flush and an SST compaction are different operations. [dong2021] Do not infer a power-loss guarantee from the in-memory structure's name; the logging and acknowledgment policy must also be specified.",
  "related": [
    "lsm-tree",
    "sstable",
    "compaction",
    "write-ahead-log",
    "rocksdb-column-family"
  ],
  "citations": [
    {
      "id": "dong2021",
      "title": "Siying Dong, Andrew Kryczka, Yanqin Jin and Michael Stumm. Evolution of Development Priorities in Key-value Stores Serving Large-scale Applications: The RocksDB Experience. FAST 2021, pp. 33-49; sections 2.2 and 4.",
      "url": "https://www.usenix.org/system/files/fast21-dong.pdf",
      "accessed": "2026-10-14"
    },
    {
      "id": "hesela",
      "title": "RocksDB: a WAL sync is not a memtable flush",
      "url": "https://hesela.com/analyses/rocksdb-wal-flush-manifest-boundaries/",
      "accessed": "2026-10-14"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-14"
}
