Commit a510307c authored by Kirill Smelkov's avatar Kirill Smelkov

.

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