Commit d124ea04 authored by Kirill Smelkov's avatar Kirill Smelkov

go/zodb/btree: Draft overview

Very brief and incomplete.
parent 2e9e5cab
......@@ -8,6 +8,25 @@
//
// http://btrees.readthedocs.io
// https://github.com/zopefoundation/BTrees
//
// A B⁺ tree consists of nodes. Only leaf tree nodes point to data.
// Intermediate tree nodes contains keys and pointer to next-level tree nodes.
//
// A well-balanced B⁺ tree always have uniform depth - that is the path to any
// leaf node from the tree root is the same. However historically ZODB/py does
// not always balance B⁺ trees well(*), so this property is not preserved.
// Nevertheless an intermediate B⁺ tree node always has children of the same
// kind: they are either all leafs or all intermediate nodes(+).
//
// BTree and Bucket represent an intermediate and a leaf tree node correspondingly.
//
// node.Get(key) performs point-query.
//
// --------
//
// (*) https://github.com/zopefoundation/ZODB/blob/3.10.7-4-gb8d7a8567/src/BTrees/Development.txt#L211
//
// (+) https://github.com/zopefoundation/ZODB/blob/3.10.7-4-gb8d7a8567/src/BTrees/Development.txt#L231
package btree
//go:generate ./gen-btree IO int32 ziobtree.go
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment