Commit d976b718 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6c514539
...@@ -1028,13 +1028,10 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]ΔValue, err error) { ...@@ -1028,13 +1028,10 @@ func diffB(ctx context.Context, a, b *Bucket) (δ map[Key]ΔValue, err error) {
bv = b.Entryv() // key↑ bv = b.Entryv() // key↑
} }
//fmt.Println("> diffB", a.POid())
//defer fmt.Println("< diffB")
δ = map[Key]ΔValue{} δ = map[Key]ΔValue{}
defer tracef(" -> δb: %v\n", δ) defer tracef(" -> δb: %v\n", δ)
//fmt.Println("av:", av) //tracef(" av: %v", av)
//fmt.Println("bv:", bv) //tracef(" bv: %v", bv)
for len(av) > 0 || len(bv) > 0 { for len(av) > 0 || len(bv) > 0 {
ka, va := KeyMax, VDEL ka, va := KeyMax, VDEL
......
...@@ -468,7 +468,7 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a ...@@ -468,7 +468,7 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
q1 := []Key{k1} q1 := []Key{k1}
q2 := []Key{k2} q2 := []Key{k2}
fmt.Println() tracef("\n")
for len(q1) > 0 || len(q2) > 0 { for len(q1) > 0 || len(q2) > 0 {
//fmt.Printf("q1: %v\n", q1) //fmt.Printf("q1: %v\n", q1)
//fmt.Printf("q2: %v\n", q2) //fmt.Printf("q2: %v\n", q2)
...@@ -748,7 +748,7 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) { ...@@ -748,7 +748,7 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) {
xkv2 := XGetTree(db, at2, tg.treeRoot) xkv2 := XGetTree(db, at2, tg.treeRoot)
subj := fmt.Sprintf("%s -> %s", tree1, tree2) subj := fmt.Sprintf("%s -> %s", tree1, tree2)
fmt.Printf("\n\n\n**** %s ****\n\n\n", subj) tracef("\n\n\n**** %s ****\n\n\n", subj)
xverifyΔBTail(t, subj, db, tg.treeRoot, at1,at2, xkv1,xkv2, δZ, test.kadjOK) xverifyΔBTail(t, subj, db, tg.treeRoot, at1,at2, xkv1,xkv2, δZ, test.kadjOK)
at1 = at2 at1 = at2
...@@ -778,6 +778,9 @@ func TestΔBTail(t *testing.T) { ...@@ -778,6 +778,9 @@ func TestΔBTail(t *testing.T) {
// test known cases going through tree1 -> tree2 -> ... // test known cases going through tree1 -> tree2 -> ...
testv := []interface{} { testv := []interface{} {
// found by AllStructs ([1] is not changed, but because B1 is
// unlinked and 1 migrates to othe bucket, changes in that
// other bucket must be included into δT)
"T1,2/B0:e-B1:d-B2:g,3:a", "T1,2/B0:e-B1:d-B2:g,3:a",
"T1/B0:d-B1:d,2:d", "T1/B0:d-B1:d,2:d",
......
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