Commit 14aa88c0 authored by Kirill Smelkov's avatar Kirill Smelkov

Sync

parents 589cc947 5c8323e8
......@@ -82,15 +82,23 @@ type Tree = btree.LOBTree
type Bucket = btree.LOBucket
type Node = btree.LONode
type Key = int64
type Value = zodb.Oid // XXX assumes key points to IPersistent
// ΔTail represents tail of revisional changes to BTrees.
//
// It semantically consists of
// It covers changes to keys from tracked subset of BTrees parts and
// semantically consists of
//
// [](rev↑, [](root, []key)) ; rev ∈ (tail, head]
// # k/v change history ; rev ∈ (tail, head]
// [](rev↑,
// [](root,
// {}(key, value)))
//
// and covers changes to tracked subsets of BTrees. A tree subset becomes
// tracked via Track(path) request.
// # set of k/v @tail for keys that are not changed in (tail, head].
// {} root ->
// {}(key, value)
//
// A tree nodes become tracked via Track(path) request.
//
// An example for tracked set is a set of visited BTree paths.
// There is no requirement that tracked set belongs to only one single BTree.
......@@ -105,7 +113,9 @@ type Key = int64
type ΔTail struct {
δBtail []ΔRevEntry // BTree changes; Covers keys ∈ tracket subset
δZtail *zodb.ΔTail // raw ZODB changes; Kept to rebuild δBtail after new Track
// head zodb.Tid // δBtail currently has coverage till head], δZtail can have more
// {} root -> {}k/v @tail for keys that are not changed in (tail, head].
atTail map[*Tree]map[Key]Value
// XXX or ask client provide db on every call?
db *zodb.DB // to open connections to load new/old tree|buckets
......
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