Commit 3950de77 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e7e8600f
...@@ -252,8 +252,9 @@ type ΔTree struct { ...@@ -252,8 +252,9 @@ type ΔTree struct {
func NewΔBtail(at0 zodb.Tid, db *zodb.DB) *ΔBtail { func NewΔBtail(at0 zodb.Tid, db *zodb.DB) *ΔBtail {
return &ΔBtail{ return &ΔBtail{
δZtail: zodb.NewΔTail(at0), δZtail: zodb.NewΔTail(at0),
byRoot: make(map[zodb.Oid]*ΔTtail), byRoot: map[zodb.Oid]*ΔTtail{},
trackIdx: map[zodb.Oid]nodeTrack{}, trackIdx: map[zodb.Oid]nodeTrack{},
holeIdx: treeSetKey{SetKey{}},
db: db, db: db,
} }
} }
...@@ -333,11 +334,15 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track ...@@ -333,11 +334,15 @@ func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags Track
// remember missing keys in track of leaf node (bucket or top-level ø tree) // remember missing keys in track of leaf node (bucket or top-level ø tree)
if !keyPresent { if !keyPresent {
δBtail.holeIdx.Add(key)
track.holes.Add(key) track.holes.Add(key)
} else { } else {
if track.holes.Has(key) { if track.holes.Has(key) {
panicf("[%v] was previously requested to be tracked as ø", key) panicf("[%v] was previously requested to be tracked as ø", key)
} }
if δBtail.holeIdx.Has(key) {
panicf("[%v] was previously requested to be tracked as ø", key)
}
} }
......
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