Commit 2ff47fda authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 192343fb
......@@ -83,7 +83,7 @@ type ΔTail struct {
// XXX -> δZtail
ΔZtail *zodb.ΔTail // raw ZODB changes; Kept to rebuild δBtail/byRoot after new Track
δroot []ΔRoots // which BTree were changed; Noted only by keys ∈ tracket subset
// δroot []ΔRoots // which BTree were changed; Noted only by keys ∈ tracket subset
byRoot map[*Tree]*ΔTreeTail // root -> k/v change history; only for keys ∈ tracket subset
// XXX or ask client provide db on every call?
......@@ -103,12 +103,14 @@ type Δ struct {
}
/*
// ΔRoots describes which BTrees were change in one revision.
// XXX kill?
type ΔRoots struct {
Rev zodb.Tid
Changev []*Tree // root XXX -> Oid? XXX -> SetTree?
}
*/
// ΔTreeTail represent tail of revisional changes to one BTree.
//
......@@ -163,7 +165,6 @@ func (δb *ΔTail) Tail() zodb.Tid {
//
// XXX δBtail is rebuild to also include keys corresponding to added nodes.
//
// XXX path is at @at state.
// XXX objects in path must be with .PJar().At() == .head
// XXX path -> []oid ?
//
......@@ -256,10 +257,8 @@ func (btail *ΔTail) Update(δZ *zodb.EventCommit) Δ {
//
// if revExact=False - rev is upper estimate for the revision.
//
// XXX only tracked set?
//
// XXX at must ∈ (tail, head] XXX [tail ?
// XXX key must be tracked -> yes
// XXX key must be tracked
func (btail *ΔTail) Get(root *Tree, key Key, at zodb.Tid) (value Value, ok bool, rev zodb.Tid, revExact bool) {
// XXX key not tracked -> panic
// XXX at not ∈ (tail, head] -> panic
......
......@@ -74,6 +74,7 @@ type ΔF struct {
// NewΔFtail creates new ΔFtail object.
//
// Initial tracked set is empty.
// Initial coverage of created ΔFtail is (at₀, at₀].
func NewΔFtail(at0 zodb.Tid) *ΔFtail {
return &ΔFtail{
......
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