Commit 4b82470d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8fe2111f
...@@ -846,8 +846,6 @@ func (δBtail *ΔBtail) SliceByRootRev(root zodb.Oid, lo, hi zodb.Tid) /*readonl ...@@ -846,8 +846,6 @@ func (δBtail *ΔBtail) SliceByRootRev(root zodb.Oid, lo, hi zodb.Tid) /*readonl
if !ok { if !ok {
return []ΔTree{} return []ΔTree{}
} }
// XXX dup data - because they can be further rebuilt in parallel to caller using them
// XXX no -> dup data in rebuild, not here
vδT := δTtail.vδT vδT := δTtail.vδT
l := len(vδT) l := len(vδT)
...@@ -867,6 +865,10 @@ func (δBtail *ΔBtail) SliceByRootRev(root zodb.Oid, lo, hi zodb.Tid) /*readonl ...@@ -867,6 +865,10 @@ func (δBtail *ΔBtail) SliceByRootRev(root zodb.Oid, lo, hi zodb.Tid) /*readonl
for ; i >= 0 && vδT[i].Rev > lo; i-- {} for ; i >= 0 && vδT[i].Rev > lo; i-- {}
i++ i++
// NOTE: no need to duplicate returned vδT slice because
// _ΔTtail.rebuild clones vδT before modifying it. This way the data we
// return to caller will stay unchanged even if rebuild is running
// simulataneously.
return vδT[i:j+1] return vδT[i:j+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