How igotlinux/pbtree works
This C++ library provides a persistent copy-on-write B+ tree: writes create a new version while preserving earlier snapshots, and reads can target either the current tree or a historical snapshot. Its internal node layer implements intrusive reference counting and cascading reclamation. The repository also includes a linked-delta baseline for comparing versioned lookup and storage costs. Relationships for the benchmark are based on README documentation; its source was not sampled.
Main entry points: btree.hpp Tree API · node.hpp Intrusive NodePtr · benchmark.cpp Performance Benchmark · delta_chain.hpp Delta Chain Store
Components 11
Persistent B+ Tree
- Tree API
include/pbtree/btree.hpp - Path Copying
include/pbtree/btree.hpp - Snapshots
include/pbtree/btree.hpp - Point Lookup
include/pbtree/btree.hpp - Range Scan
include/pbtree/btree.hpp
Node Memory
- Tree Nodes
include/pbtree/node.hpp - Intrusive NodePtr
include/pbtree/node.hpp - Node Reclamation
include/pbtree/node.hpp
Benchmark Comparison
- Performance Benchmark
bench/benchmark.cpp - Delta Chain Store
include/pbtree/delta_chain.hpp
Other components
- Library Caller
Connections 13
- Library Caller → Tree API: calls
README.md - Tree API → Path Copying: dispatches writes
include/pbtree/btree.hpp - Tree API → Snapshots: creates snapshots
include/pbtree/btree.hpp - Tree API → Point Lookup: routes lookups
include/pbtree/btree.hpp - Tree API → Range Scan: routes scans
include/pbtree/btree.hpp - Path Copying → Tree Nodes: copies path nodes
include/pbtree/btree.hpp - Path Copying → Intrusive NodePtr: shares subtrees
include/pbtree/btree.hpp - Snapshots → Intrusive NodePtr: copies root handle
include/pbtree/btree.hpp - Point Lookup → Tree Nodes: traverses nodes
include/pbtree/btree.hpp - Range Scan → Tree Nodes: traverses nodes
include/pbtree/btree.hpp - Intrusive NodePtr → Node Reclamation: releases references
include/pbtree/node.hpp - Performance Benchmark → Tree API: measures
README.md - Performance Benchmark → Delta Chain Store: compares against
README.md