Commit cb2fae27 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b221b0b6
......@@ -100,21 +100,11 @@ func (S PPTreeSubSet) AddPath(path []zodb.Oid) {
panic("empty path")
}
// normalize path: remove embedded bucket and check whether it was an
// artificial empty tree.
path = normPath(path)
/*
// don't keep track of artificial empty tree
if l == 1 && path[0] == zodb.InvalidOid {
return
}
// don't explicitly keep track of embedded buckets - they all have
// InvalidOid, and thus, if kept in S, e.g. T/B1:a and another
// T/B2:b would lead to InvalidOid having multiple parents.
if l == 2 && path[1] == zodb.InvalidOid {
path = path[:1]
}
*/
// go through path and add nodes to the set
parent := zodb.InvalidOid
var pt *nodeInTree = nil
for _, oid := range path {
......
......@@ -37,7 +37,7 @@ import (
// TODO kill this after rebuild is finished
const XXX_killWhenRebuildWorks = true
const traceΔBtail = true
const traceΔBtail = false
const debugΔBtail = false
......@@ -177,8 +177,8 @@ func newΔTtail() *ΔTtail {
}
}
// xverifyΔBTail_rebuild needs ΔBTree.clone because otherwise it is too slow to run that test.
func (orig *ΔBtail) clone() *ΔBtail {
// Clone returns copy of ΔBtail.
func (orig *ΔBtail) Clone() *ΔBtail {
klon := &ΔBtail{db: orig.db}
// δZtail
......
......@@ -1062,7 +1062,7 @@ func xverifyΔBTail_rebuild(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, t0, t1
// t.Run is expensive at this level of nest
// t.Run(" T"+keys2.String()+";R", func(t *testing.T) {
δbtail_ := δbtail.clone()
δbtail_ := δbtail.Clone()
xverifyΔBTail_rebuild_TR(t, db, δbtail_, t2, treeRoot, xat,
// after Track(keys2)
keys2,
......
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