Commit a510307c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a9a56005
......@@ -47,8 +47,8 @@ import (
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xzodb"
)
const kInf Key = 10000 // inf key (TeX hack)
//const kInf Key = KeyMax
//const kInf Key = 10000 // inf key (TeX hack)
////const kInf Key = KeyMax
// XXX move infrastructure -> δbtail_treegen_test.go ?
......@@ -387,7 +387,8 @@ func XGetTree(db *zodb.DB, at zodb.Tid, root zodb.Oid) RBucketSet {
}
rbucketv := RBucketSet{}
xwalkDFS(ctx, -kInf, kInf, ztree, func(rb *RBucket) {
// xwalkDFS(ctx, -kInf, kInf, ztree, func(rb *RBucket) {
xwalkDFS(ctx, KeyMin, KeyMax, ztree, func(rb *RBucket) {
rbucketv = append(rbucketv, rb)
})
if len(rbucketv) == 0 { // empty tree -> [-∞, ∞){}
......@@ -398,8 +399,8 @@ func XGetTree(db *zodb.DB, at zodb.Tid, root zodb.Oid) RBucketSet {
ebucket := &RBucket{
oid: zodb.InvalidOid,
parent: etree,
lo: -kInf,
hi_: kInf,
lo: KeyMin,
hi_: KeyMax,
kv: map[Key]string{},
}
rbucketv = RBucketSet{ebucket}
......@@ -803,7 +804,8 @@ func xverifyΔBTail_Update1(t *testing.T, subj string, db *zodb.DB, treeRoot zod
trackedNotInKadj.Add(k)
}
}
trackedNotInKadj.Del(kInf)
// trackedNotInKadj.Del(kInf)
trackedNotInKadj.Del(KeyMax)
if len(trackedNotInKadj) > 0 {
badf("BUG: Tracked ∉ kadj[Tracked] ; extra=%v", trackedNotInKadj)
return
......@@ -1449,8 +1451,10 @@ func TestΔBTail(t *testing.T) {
for _, k := range keyv { ks.Add(k) }
return ks
}
// oo is shorthand for kInf
const oo = kInf
// // oo is shorthand for kInf
// const oo = kInf
// oo is shorthand for KeyMax
const oo = KeyMax
// A is shorthand for KAdjMatrix
type A = KAdjMatrix
// Δ is shorthand for ΔBTestEntry
......@@ -1932,7 +1936,8 @@ func (xkv RBucketSet) Flatten() map[Key]string {
// allTestKeys returns all keys from vt + ∞.
func allTestKeys(vt ...*tTreeCommit) SetKey {
allKeys := SetKey{}; allKeys.Add(kInf) // ∞ simulating ZBigFile.Size() query
// allKeys := SetKey{}; allKeys.Add(kInf) // ∞ simulating ZBigFile.Size() query
allKeys := SetKey{}; allKeys.Add(KeyMax) // ∞ simulating ZBigFile.Size() query
for _, t := range vt {
for _, b := range t.xkv {
for k := range b.kv {
......
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