Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
fd501e3d
Commit
fd501e3d
authored
Oct 08, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fcdfff39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
go/zodb/btree/btree.go
go/zodb/btree/btree.go
+18
-4
go/zodb/btree/gen-btree
go/zodb/btree/gen-btree
+1
-1
No files found.
go/zodb/btree/btree.go
View file @
fd501e3d
...
...
@@ -11,12 +11,26 @@
//
// 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.
// B⁺ tree always have uniform height - that is the path to any leaf node from
// the tree root is the same. XXX
//
// BTree.Get(key) performs point-query.
// 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(+).
//
// B⁺ Trees
// BTree and Bucket represent an intermediate and a leaf tree node correspondingly.
//
// node.Get(key) performs point-query.
//
// node.{Min,Max}Key() returns key-range limit for all children/values under the node.
//
// node.Entryv() returns [] of (key, child/value).
//
// --------
//
// (*) 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
...
...
go/zodb/btree/gen-btree
View file @
fd501e3d
...
...
@@ -2,7 +2,7 @@
# btree.go.in -> specialized with concrete types
# gen-btree KIND KEY out
# Copyright (C) 201
7
Nexedi SA and Contributors.
# Copyright (C) 201
8
Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment