Commit e1a042ce authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent be655e7f
...@@ -89,7 +89,7 @@ type ΔBtail struct { ...@@ -89,7 +89,7 @@ type ΔBtail struct {
δZtail *zodb.ΔTail δZtail *zodb.ΔTail
δRtail []ΔRoots // which BTree were changed; Noted only by keys ∈ tracket subset δRtail []Δ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 byRoot map[*Tree]*ΔTtail // root -> k/v change history; only for keys ∈ tracket subset
// XXX or ask client to provide db on every call? // XXX or ask client to provide db on every call?
db *zodb.DB // to open connections to load new/old tree|buckets db *zodb.DB // to open connections to load new/old tree|buckets
...@@ -113,12 +113,12 @@ type ΔRoots struct { ...@@ -113,12 +113,12 @@ type ΔRoots struct {
Roots []*Tree // root XXX -> Oid? XXX -> SetTree? Roots []*Tree // root XXX -> Oid? XXX -> SetTree?
} }
// ΔTreeTail represent tail of revisional changes to one BTree. // ΔTtail represent tail of revisional changes to one BTree.
// //
// See ΔBtail documentation for details. // See ΔBtail documentation for details.
// //
// XXX -> ΔTtail // XXX -> ΔTtail
type ΔTreeTail struct { type ΔTtail struct {
vδT []ΔTree // changes to tree keys; rev↑. covers keys ∈ tracket subset vδT []ΔTree // changes to tree keys; rev↑. covers keys ∈ tracket subset
// {}k/v @tail for keys that are changed in (tail, head]. // {}k/v @tail for keys that are changed in (tail, head].
...@@ -142,14 +142,14 @@ type ΔTree struct { ...@@ -142,14 +142,14 @@ type ΔTree struct {
func NewΔBtail(at0 zodb.Tid) *ΔBtail { func NewΔBtail(at0 zodb.Tid) *ΔBtail {
return &ΔBtail{ return &ΔBtail{
δZtail: zodb.NewΔTail(at0), δZtail: zodb.NewΔTail(at0),
byRoot: make(map[*Tree]*ΔTreeTail), byRoot: make(map[*Tree]*ΔTtail),
trackIdx: make(map[zodb.Oid]SetTree), trackIdx: make(map[zodb.Oid]SetTree),
} }
} }
// newΔTtail creates new empty ΔTtail object. // newΔTtail creates new empty ΔTtail object.
func newΔTtail() *ΔTreeTail { func newΔTtail() *ΔTtail {
return &ΔTreeTail{ return &ΔTtail{
KVAtTail: make(map[Key]Value), KVAtTail: make(map[Key]Value),
lastRevOf: make(map[Key]zodb.Tid), lastRevOf: make(map[Key]zodb.Tid),
} }
......
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