Commit f626ec3e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a39d91af
...@@ -751,11 +751,10 @@ ABcov: ...@@ -751,11 +751,10 @@ ABcov:
b.done = true b.done = true
} }
// stop if r coverage is complete // continue with next right bucket until r coverage is complete
if r.hi_ <= b.hi_ { if r.hi_ <= b.hi_ {
break break
} }
// continue with next right bucket
lo = b.hi_ + 1 lo = b.hi_ + 1
} }
} }
......
...@@ -234,6 +234,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() } ...@@ -234,6 +234,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
// XXX path -> []oid ? // XXX path -> []oid ?
// //
// XXX catch cycles on add? // XXX catch cycles on add?
// XXX no need to pass in key
func (δBtail *ΔBtail) Track(key Key, nodePath []Node) error { // XXX Tree|Bucket; path[0] = root func (δBtail *ΔBtail) Track(key Key, nodePath []Node) error { // XXX Tree|Bucket; path[0] = root
path := nodePathToPath(nodePath) path := nodePathToPath(nodePath)
...@@ -339,20 +340,37 @@ func (δTtail *ΔTtail) rebuild(δZtail *zodb.ΔTail, db *zodb.DB) (δtrackSet P ...@@ -339,20 +340,37 @@ func (δTtail *ΔTtail) rebuild(δZtail *zodb.ΔTail, db *zodb.DB) (δtrackSet P
// XXX update .KVAtTail, .lastRevOf // XXX update .KVAtTail, .lastRevOf
} }
// an iteration closer to tail may turn out to add a key to the tracking set // an iteration closer to tail may turn out to add a key to the tracking set.
// we have to recheck all entries past that revision for changes to that key // We have to recheck all entries newer that revision for changes to that key
// for example: // for example:
// //
// XXX // XXX
// //
// restart from head and cycle until set of tracked keys does not grow anymore // Implement this via restarting from head and cycling until
// set of tracked keys does not grow anymore.
if δtkeycov.Empty() { if δtkeycov.Empty() {
break break
} }
top := &nodeInRange{prefix: nil, lo: KeyMin, hi_: KeyMax, node: root}
V := rangeSplit{top}
for _, r := δtkeycov.AllRanges() { for _, r := δtkeycov.AllRanges() {
lo := r.lo
for {
b, err := V.GetToLeaf(ctx, lo)
if err != nil {
return nil, err
}
trackNew.AddPath(b.Path())
// continue with next right bucket until r coverage is complete
if r.hi_ <= b.hi_ {
break
}
lo = b.hi_ + 1
}
} }
} }
......
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