Commit cb2fae27 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b221b0b6
...@@ -100,21 +100,11 @@ func (S PPTreeSubSet) AddPath(path []zodb.Oid) { ...@@ -100,21 +100,11 @@ func (S PPTreeSubSet) AddPath(path []zodb.Oid) {
panic("empty path") panic("empty path")
} }
// normalize path: remove embedded bucket and check whether it was an
// artificial empty tree.
path = normPath(path) 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 parent := zodb.InvalidOid
var pt *nodeInTree = nil var pt *nodeInTree = nil
for _, oid := range path { for _, oid := range path {
......
...@@ -37,7 +37,7 @@ import ( ...@@ -37,7 +37,7 @@ import (
// TODO kill this after rebuild is finished // TODO kill this after rebuild is finished
const XXX_killWhenRebuildWorks = true const XXX_killWhenRebuildWorks = true
const traceΔBtail = true const traceΔBtail = false
const debugΔBtail = false const debugΔBtail = false
...@@ -177,8 +177,8 @@ func newΔTtail() *ΔTtail { ...@@ -177,8 +177,8 @@ func newΔTtail() *ΔTtail {
} }
} }
// xverifyΔBTail_rebuild needs ΔBTree.clone because otherwise it is too slow to run that test. // Clone returns copy of ΔBtail.
func (orig *ΔBtail) clone() *ΔBtail { func (orig *ΔBtail) Clone() *ΔBtail {
klon := &ΔBtail{db: orig.db} klon := &ΔBtail{db: orig.db}
// δZtail // δZtail
......
...@@ -1062,7 +1062,7 @@ func xverifyΔBTail_rebuild(t *testing.T, db *zodb.DB, treeRoot zodb.Oid, t0, t1 ...@@ -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 is expensive at this level of nest
// t.Run(" T"+keys2.String()+";R", func(t *testing.T) { // 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, xverifyΔBTail_rebuild_TR(t, db, δbtail_, t2, treeRoot, xat,
// after Track(keys2) // after Track(keys2)
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