Commit c051c89b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 644bcd6a
......@@ -432,21 +432,10 @@ func (δBtail *ΔBtail) rebuildAll() (err error) {
return nil
}
/* XXX kill
// rebuild1IfNeeded rebuilds ΔBtail for single root if that root needs rebuilding.
func (δBtail *ΔBtail) rebuild1IfNeeded(root zodb.Oid) error {
// XXX locking
_, ok := δBtail.trackNewRoots[root]
if !ok {
return nil
}
delete(δBtail.trackNewRoots, root)
return δBtail.rebuild1(root)
}
*/
// vδTSnapForTrackedKey returns vδT snapshot for root that takes into account at least all previous Track requests related to key.
// vδTSnapForTrackedKey returns vδT snapshot for root that takes into account
// at least all previous Track requests related to key.
//
// vδT is rebuilt if there are such not-yet-handled Track requests.
func (δBtail *ΔBtail) vδTSnapForTrackedKey(root zodb.Oid, key Key) (vδT []ΔTree, err error) {
// XXX δBtail.lock
δTtail := δBtail.byRoot[root] // must be there
......@@ -478,7 +467,7 @@ func (δBtail *ΔBtail) vδTSnapForTrackedKey(root zodb.Oid, key Key) (vδT []Δ
}
// key ∈ ktrackNew -> this goroutine becomes responsible to start rebuilding vδT for it
// lauch rebuild job for all keys queued in ktrackNew so far
// launch rebuild job for all keys queued in ktrackNew so far
err = δTtail._runRebuildJob(root, δBtail)
if err != nil {
return nil, err
......@@ -491,7 +480,10 @@ func (δBtail *ΔBtail) vδTSnapForTrackedKey(root zodb.Oid, key Key) (vδT []Δ
return vδT, nil
}
// vδTSnapForTracked returns vδT snapshot for root that takes into account all previous Track requests.
// vδTSnapForTracked returns vδT snapshot for root that takes into account all
// previous Track requests.
//
// vδT is rebuilt if there are such not-yet-handled Track requests.
func (δBtail *ΔBtail) vδTSnapForTracked(root zodb.Oid) (vδT []ΔTree, err error) {
// XXX δBtail.lock
δTtail := δBtail.byRoot[root] // must be there
......
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