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