Commit b81173f3 authored by Kirill Smelkov's avatar Kirill Smelkov

X fix

parent 46340069
......@@ -238,7 +238,9 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
δF := ΔF{Rev: δB.Rev, ByFile: make(map[zodb.Oid]*ΔFile)}
// take btree changes into account
// fmt.Printf("δB.ΔByRoot: %v\n", δB.ΔByRoot)
for root, δt := range δB.ΔByRoot {
// fmt.Printf("root: %v δt: %v\n", root, δt)
files := δFtail.fileIdx[root]
if len(files) == 0 {
panicf("BUG: ΔFtail: root<%s> -> ø files", root)
......@@ -307,6 +309,10 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
}
for root, inblk := range zt.inroot {
if len(inblk) == 0 {
continue
}
// fmt.Printf("root: %v inblk: %v\n", root, inblk)
files := δFtail.fileIdx[root]
for file := range files {
δfile, ok := δF.ByFile[file]
......@@ -320,6 +326,8 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
}
}
// fmt.Printf("-> δF: %v\n", δF)
δFtail.vδF = append(δFtail.vδF, δF)
return δF, nil
}
......
......@@ -175,6 +175,8 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
xat[commit.At] = fmt.Sprintf("at%d", i)
t.Logf("# → @%s (%s) δT%s δD%s\t; %s", xat[commit.At], commit.At, xbtreetest.KVTxt(test.δblkTab), test.δdataTab, tTxt)
// fmt.Printf("Zinblk: %v\n", Zinblk)
// update δftail
δF, err := δftail.Update(commit.ΔZ); X(err)
......
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