Commit d3e4212a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ac4ff8df
......@@ -818,19 +818,23 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
// ( this does not give exact answer but should be a reasonable heuristic;
// the diff is the same if heuristic does not work and we
// look into and load more nodes to compute δ )
_, ok := BtrackIdx[acOid]
if !ok {
_, found := BtrackIdx[acOid]
if !found {
for {
blo := Bv.Get(ac.lo)
bhi_ := Bv.Get(ac.hi_)
if blo != bhi_ {
break
}
_, ok := blo.node.(*Tree)
if !ok {
break // bucket
}
err = blo.node.PActivate(ctx); /*X*/if err != nil { return nil, err }
defer blo.node.PDeactivate()
// XXX check for empty tree?
bchildren := Bv.Expand(blo)
found := false
for _, bc := range bchildren {
bcOid := bc.node.POid()
BtrackIdx[bcOid] = nodeTrack{parent: blo.node.POid()}
......@@ -843,7 +847,7 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
}
}
}
if ok {
if found {
// ac can be skipped
// XXX Bkqueue <- holes(ac.range \ bc.range)
continue
......
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