Commit f9e37bd9 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent dbb3a283
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
package main package main
// XXX doc (2 ways of testing: explicit + allstructs), treegen py helper // XXX doc (2 ways of testing: explicit + allstructs), treegen py helper
//
// Adjacency matrix // Adjacency matrix
// //
// A, B - topologies ex T/B1 T2/B1-B3 // A, B - topologies ex T/B1 T2/B1-B3
...@@ -392,8 +392,7 @@ func xwalkDFS(ctx context.Context, lo, hi Key, ztree *Tree, bvisit func(*RBucket ...@@ -392,8 +392,7 @@ func xwalkDFS(ctx context.Context, lo, hi Key, ztree *Tree, bvisit func(*RBucket
} }
/* XXX kill
/*
err = ztree.PActivate(ctx); X(err) err = ztree.PActivate(ctx); X(err)
defer ztree.PDeactivate() defer ztree.PDeactivate()
...@@ -464,13 +463,6 @@ func XGetKV(db *zodb.DB, at zodb.Tid, kvOid map[Key]Value) map[Key]string { ...@@ -464,13 +463,6 @@ func XGetKV(db *zodb.DB, at zodb.Tid, kvOid map[Key]Value) map[Key]string {
return kv return kv
} }
/*
// XGetBucket retrurns Bucket corresponding to root[k].
func XGetBucket(db *zodb.DB, at zodb.Tid, root zodb.Oid) ... {
// XXX kill -> amend XGetTree
}
*/
// xverifyΔBTail verifies how ΔBTail handles ZODB update for a tree with changes in between at1->at2. // xverifyΔBTail verifies how ΔBTail handles ZODB update for a tree with changes in between at1->at2.
// //
...@@ -502,12 +494,6 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a ...@@ -502,12 +494,6 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
// maxkey among kv1+kv2 // maxkey among kv1+kv2
// it must be present in δB if maxkey tracking is requested. // it must be present in δB if maxkey tracking is requested.
maxKey := maxk1; if maxk2 > maxk1 { maxKey = maxk2 } maxKey := maxk1; if maxk2 > maxk1 { maxKey = maxk2 }
/*
maxKey := -kInf
if l := len(allKeyv); l > 0 {
maxKey = allKeyv[l-1] // FIXME always returns kInf -> rework to be real maxkey
}
*/
// {} k -> adjacent keys. if k is tracked -> changes to adjacents must be in δT. // {} k -> adjacent keys. if k is tracked -> changes to adjacents must be in δT.
kadj := map[Key]SetKey{} kadj := map[Key]SetKey{}
...@@ -539,7 +525,6 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a ...@@ -539,7 +525,6 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
panic(fmt.Sprintf("BUG: %s: computed kadj is wrong:\nkadjOK: %v\nkadj : %v\n", subj, kadjOK, kadj)) panic(fmt.Sprintf("BUG: %s: computed kadj is wrong:\nkadjOK: %v\nkadj : %v\n", subj, kadjOK, kadj))
} }
for kidx := range IntSets(len(allKeyv)) { for kidx := range IntSets(len(allKeyv)) {
keys := SetKey{} keys := SetKey{}
for _, idx := range kidx { for _, idx := range kidx {
......
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