Commit c5969bd9 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c2d31c88
......@@ -289,10 +289,12 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
panic("empty path")
}
treeRoot := path[0].(*Tree)
/*
var leafBucket *Bucket
if l := len(path); l > 1 {
leafBucket = path[l-1].(*Bucket)
}
*/
// XXX assert Tree Tree ... Tree Bucket
root := treeRoot.POid()
......@@ -309,7 +311,7 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
// XXX check for InvalidOid (e.g. T/B1:a with bucket not having its own oid.
track, oldTrack = δBtail.trackIdx[oid]
if !oldTrack {
track = nodeTrack{parent: parent, holes: SetKey{}}
track = nodeTrack{parent: parent, holes: SetKey{}}
δBtail.trackIdx[oid] = track
// XXX .trackNew += oid
}
......@@ -321,8 +323,10 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
parent = oid
}
// remember tracked holes in trackIdx
// remember missing keys in track of leaf node (bucket or top-level ø tree)
if !keyPresent {
track.holes.Add(key)
/*
if leafBucket != nil {
track.holes.Add(key)
} else {
......@@ -330,6 +334,7 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
rootTrack := δBtail.trackIdx[root] // must succeed
rootTrack.holes.Add(key)
}
*/
}
/* XXX kill
......
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