Commit e88afbd4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ffaad0a6
......@@ -104,8 +104,7 @@ type ΔBtail struct {
// ΔB represents a change in BTrees space.
type ΔB struct {
Rev zodb.Tid
// XXX -> ByRoot?
Change map[*Tree]map[Key]Value // {} root -> {}(key, value)
ByRoot map[*Tree]map[Key]Value // {} root -> {}(key, value)
}
// ΔRoots describes which BTrees were change in one revision.
......@@ -224,13 +223,13 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) ΔB {
}
}
δB := ΔB{Rev: δZ.Tid, Change: make(map[*Tree]map[Key]Value)}
δB := ΔB{Rev: δZ.Tid, ByRoot: make(map[*Tree]map[Key]Value)}
for root := range δZByRoot {
δt, ok := δB.Change[root]
δt, ok := δB.ByRoot[root]
if !ok {
δt = make(map[Key]Value)
δB.Change[root] = δt
δB.ByRoot[root] = δt
}
// XXX stub to get file.size invalidation working
// TODO update δt
......
......@@ -192,7 +192,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit, zhead *ZConn) ΔF {
δF := ΔF{Rev: δB.Rev, ByFile: make(map[*BigFile]*ΔFile)}
// take btree changes into account
for root, δt := range δB.Change {
for root, δt := range δB.ByRoot {
files := δFtail.fileIdx[root]
if len(files) == 0 {
panicf("ΔFtail: root<%s> -> ø file", root.POid())
......
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