{
  "slug": "bw-tree",
  "term": "Bw-tree",
  "aliases": [
    "BwTree",
    "Buzz Word Tree"
  ],
  "definition": "The Bw-tree is a B+ tree design that uses a page mapping table and immutable delta chains to install node changes with atomic compare-and-swap.",
  "note": "Updates: Logical page identifiers survive relocation. A writer links a delta to the observed head and compares that head when publishing; a competing change can force a retry. [bw-original]\n\nConsolidation: A replacement base page incorporates a captured chain. Installation must still validate its head; a stale replacement is discarded. Retired storage cannot be reused while protected readers may access it. [bw-original]\n\nScan boundary: The 2013 design makes individual next-record operations atomic, not the whole scan. Its index and log-structured storage layers are distinct; pointer publication alone is not durability. [bw-original]\n\nPhysical order: OpenBw-Tree preallocates delta space, but allocation order can differ from chain-publication order. Readers must follow links, not assume address order reconstructs history. [bw-implementation]\n\nPerformance: The 2018 in-memory study identifies allocation, indirection, traversal and epoch-accounting costs. Its comparisons do not establish a universal lock-free speed advantage or SSD endurance result. [bw-implementation]\n\nExecutable example: Six event orderings cover one writer and one consolidation. Guarded publication retains the accepted update in all six; an intentionally unchecked replacement loses it in two. These are model cases, not failure probabilities or native Bw-tree defects. [consolidation-model] [model-results]\n\nStable-log boundary: With a transactional log, consolidation and flushing require LSN <= ESL; newer deltas remain separable. [bw-original] ESL/EOSL covers a gap-free prefix, not the largest logged LSN: physical log order may differ. [deuteronomy] RSSP acknowledgement instead requires every earlier update durable. [bw-original]",
  "status": "research",
  "advantages": [],
  "limitations": [
    {
      "text": "The example excludes splits, merges, memory reclamation, weak-memory ordering, I/O and crashes; it is not a complete concurrency or recovery proof.",
      "citationIds": [
        "consolidation-model"
      ]
    },
    {
      "text": "The stable-log model reconstructs durable operations, not committed transactions; it excludes undo, RSSP truncation and actual power-loss behavior.",
      "citationIds": [
        "wal-model",
        "deuteronomy"
      ]
    }
  ],
  "related": [
    "b-tree",
    "b-plus-tree",
    "b-link-tree",
    "llama"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-15",
  "citations": [
    {
      "id": "bw-original",
      "title": "Levandoski, Lomet and Sengupta. The Bw-Tree: A B-tree for New Hardware Platforms. ICDE 2013; sections II, III.A-D and V.A. DOI: 10.1109/ICDE.2013.6544834.",
      "url": "https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/bw-tree-icde2013-final.pdf",
      "accessed": "2026-11-15"
    },
    {
      "id": "bw-implementation",
      "title": "Wang et al. Building a Bw-Tree Takes More Than Just Buzz Words. SIGMOD 2018, pp. 473-488, sections 3-6. DOI: 10.1145/3183713.3196895.",
      "url": "https://db.cs.cmu.edu/papers/2018/mod342-wangA.pdf",
      "accessed": "2026-11-15"
    },
    {
      "id": "consolidation-model",
      "title": "Hesela: bounded consolidation-publication model and executable negative control (Node.js; no dependencies).",
      "url": "https://hesela.dev/research/bw-tree-consolidation.mjs",
      "accessed": "2026-11-15"
    },
    {
      "id": "model-results",
      "title": "Hesela: all six modeled interleavings, guarded and intentionally unchecked outcomes.",
      "url": "https://hesela.dev/research/bw-tree-consolidation.json",
      "accessed": "2026-11-15"
    },
    {
      "id": "deuteronomy",
      "title": "Levandoski, Lomet, Mokbel and Zhao. Deuteronomy: Transaction Support for Cloud Data. CIDR 2011, pp. 123-133, sections 4.5-4.5.2 and 5.1.",
      "url": "https://www.cidrdb.org/cidr2011/Papers/CIDR11_Paper14.pdf",
      "accessed": "2026-11-15"
    },
    {
      "id": "wal-model",
      "title": "Hesela: stable-log eligibility and abstract recovery model; executable Node.js source.",
      "url": "https://hesela.dev/research/bw-tree-wal.mjs",
      "accessed": "2026-11-15"
    },
    {
      "id": "wal-results",
      "title": "Hesela: 45 stable-log model cases with guarded and intentionally unchecked outcomes.",
      "url": "https://hesela.dev/research/bw-tree-wal.json",
      "accessed": "2026-11-15"
    }
  ],
  "provenance": [
    "Primary-paper comparison plus a deterministic teaching model; no native Bw-tree execution, hardware benchmark or crash experiment was performed.",
    "The model's accepted update means successful in-memory publication, not durable database commit.",
    "The 2018 baseline is a good-faith reconstruction of Microsoft's proposed design, not its private engine; OpenBw-Tree is the study's optimized implementation.",
    "The separate 45-case model covers log holes, delayed notifications, overwrites, deletion and reinsertion. Eligible state plus replay is checked against a per-key oracle. [wal-model] [wal-results]",
    "The unchecked variant preserves the memory view but can persist an unlogged update. The examples are abstract operation reconstruction, not native crash tests or committed-transaction recovery. [wal-model]"
  ]
}
