├── .gitignore ├── BUCKET.md ├── DATA_AND_INDEX.md ├── LICENSE ├── README.md ├── STORAGE_AND_CACHE.md ├── TX.md ├── api ├── batch_create.go ├── batch_create.txt ├── delete_buckets.go ├── generate_1000_users.go ├── lib │ ├── crud.go │ ├── db.go │ └── util.go ├── open.go └── range_query.go ├── bucket ├── create_bucket.go └── visitkv.go ├── go.mod ├── go.sum ├── statics ├── imgs │ ├── bucket-insert-bucket2.jpg │ ├── bucket-insert-new-inline-bucket.jpg │ ├── bucket-nested-buckets.jpg │ ├── bucket-new-bucket-1.jpg │ ├── bucket-new-bucket-2.jpg │ ├── bucket-new-bucket-b1.jpg │ ├── bucket-new-inline-bucket.jpg │ ├── bucket-normal-bucket-b-plus-tree.jpg │ ├── bucket-normal-bucket.jpg │ ├── bucket-root-bucket-tree.jpg │ ├── bucket-root-bucket.jpg │ ├── data-and-index-b-plus-tree.jpg │ ├── data-and-index-branch-leaf-page.jpg │ ├── data-and-index-branch-page-node.jpg │ ├── data-and-index-leaf-page-node.jpg │ ├── data-and-index-oversize-page.jpg │ ├── data-and-index-oversized-kv.jpg │ ├── data-and-index-rebalance-1.jpg │ ├── data-and-index-rebalance-2.jpg │ ├── data-and-index-rebalance-3.jpg │ ├── data-and-index-spill-1.jpg │ ├── data-and-index-spill-2.jpg │ ├── data-and-index-spill-3.jpg │ ├── data-and-index-spill-4.jpg │ ├── data-and-index-unbalanced-node.jpg │ ├── search-time-complexity.jpg │ ├── storage-and-cache-branch-leaf-page-layout.jpg │ ├── storage-and-cache-branch-page-element-header.jpg │ ├── storage-and-cache-branch-page-layout.jpg │ ├── storage-and-cache-empty-instance-layout.jpg │ ├── storage-and-cache-freelist-example.jpg │ ├── storage-and-cache-freelist-free-pages.jpg │ ├── storage-and-cache-freelist-page-layout.jpg │ ├── storage-and-cache-leaf-page-element-header.jpg │ ├── storage-and-cache-leaf-page.jpg │ ├── storage-and-cache-meta-page-layout.jpg │ ├── storage-and-cache-overflow-freelist-page.jpg │ ├── storage-and-cache-overflow-page.jpg │ ├── storage-and-cache-page-header.jpg │ ├── storage-and-cache-page-layout.jpg │ ├── storage_bucket_hierarchy.jpg │ ├── storage_mvcc.jpg │ ├── tx-boltdb-mvcc-example.jpg │ ├── tx-boltdb-page.jpg │ └── tx-transactional-memory.jpg └── xmls │ ├── b_plus_tree.drawio │ ├── boltdb.drawio │ ├── bucket.drawio │ └── tx.drawio └── tx └── exec_example.go /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/.gitignore -------------------------------------------------------------------------------- /BUCKET.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/BUCKET.md -------------------------------------------------------------------------------- /DATA_AND_INDEX.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/DATA_AND_INDEX.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/README.md -------------------------------------------------------------------------------- /STORAGE_AND_CACHE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/STORAGE_AND_CACHE.md -------------------------------------------------------------------------------- /TX.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/TX.md -------------------------------------------------------------------------------- /api/batch_create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/batch_create.go -------------------------------------------------------------------------------- /api/batch_create.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/batch_create.txt -------------------------------------------------------------------------------- /api/delete_buckets.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/delete_buckets.go -------------------------------------------------------------------------------- /api/generate_1000_users.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/generate_1000_users.go -------------------------------------------------------------------------------- /api/lib/crud.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/lib/crud.go -------------------------------------------------------------------------------- /api/lib/db.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/lib/db.go -------------------------------------------------------------------------------- /api/lib/util.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/lib/util.go -------------------------------------------------------------------------------- /api/open.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/open.go -------------------------------------------------------------------------------- /api/range_query.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/api/range_query.go -------------------------------------------------------------------------------- /bucket/create_bucket.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/bucket/create_bucket.go -------------------------------------------------------------------------------- /bucket/visitkv.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/bucket/visitkv.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/go.sum -------------------------------------------------------------------------------- /statics/imgs/bucket-insert-bucket2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-insert-bucket2.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-insert-new-inline-bucket.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-insert-new-inline-bucket.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-nested-buckets.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-nested-buckets.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-new-bucket-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-new-bucket-1.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-new-bucket-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-new-bucket-2.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-new-bucket-b1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-new-bucket-b1.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-new-inline-bucket.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-new-inline-bucket.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-normal-bucket-b-plus-tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-normal-bucket-b-plus-tree.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-normal-bucket.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-normal-bucket.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-root-bucket-tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-root-bucket-tree.jpg -------------------------------------------------------------------------------- /statics/imgs/bucket-root-bucket.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/bucket-root-bucket.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-b-plus-tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-b-plus-tree.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-branch-leaf-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-branch-leaf-page.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-branch-page-node.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-branch-page-node.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-leaf-page-node.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-leaf-page-node.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-oversize-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-oversize-page.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-oversized-kv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-oversized-kv.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-rebalance-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-rebalance-1.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-rebalance-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-rebalance-2.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-rebalance-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-rebalance-3.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-spill-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-spill-1.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-spill-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-spill-2.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-spill-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-spill-3.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-spill-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-spill-4.jpg -------------------------------------------------------------------------------- /statics/imgs/data-and-index-unbalanced-node.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/data-and-index-unbalanced-node.jpg -------------------------------------------------------------------------------- /statics/imgs/search-time-complexity.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/search-time-complexity.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-branch-leaf-page-layout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-branch-leaf-page-layout.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-branch-page-element-header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-branch-page-element-header.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-branch-page-layout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-branch-page-layout.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-empty-instance-layout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-empty-instance-layout.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-freelist-example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-freelist-example.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-freelist-free-pages.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-freelist-free-pages.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-freelist-page-layout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-freelist-page-layout.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-leaf-page-element-header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-leaf-page-element-header.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-leaf-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-leaf-page.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-meta-page-layout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-meta-page-layout.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-overflow-freelist-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-overflow-freelist-page.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-overflow-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-overflow-page.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-page-header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-page-header.jpg -------------------------------------------------------------------------------- /statics/imgs/storage-and-cache-page-layout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage-and-cache-page-layout.jpg -------------------------------------------------------------------------------- /statics/imgs/storage_bucket_hierarchy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage_bucket_hierarchy.jpg -------------------------------------------------------------------------------- /statics/imgs/storage_mvcc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/storage_mvcc.jpg -------------------------------------------------------------------------------- /statics/imgs/tx-boltdb-mvcc-example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/tx-boltdb-mvcc-example.jpg -------------------------------------------------------------------------------- /statics/imgs/tx-boltdb-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/tx-boltdb-page.jpg -------------------------------------------------------------------------------- /statics/imgs/tx-transactional-memory.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/imgs/tx-transactional-memory.jpg -------------------------------------------------------------------------------- /statics/xmls/b_plus_tree.drawio: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/xmls/b_plus_tree.drawio -------------------------------------------------------------------------------- /statics/xmls/boltdb.drawio: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/xmls/boltdb.drawio -------------------------------------------------------------------------------- /statics/xmls/bucket.drawio: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/xmls/bucket.drawio -------------------------------------------------------------------------------- /statics/xmls/tx.drawio: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/statics/xmls/tx.drawio -------------------------------------------------------------------------------- /tx/exec_example.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZhengHe-MD/learn-bolt/HEAD/tx/exec_example.go --------------------------------------------------------------------------------