Commit b54817e7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3c979803
......@@ -224,24 +224,24 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
}
δFtail.δBtail.Track(blk, path)
root := path[0].(*btree.LOBTree)
roid := root.POid()
files, ok := δFtail.fileIdx[roid]
rootObj := path[0].(*btree.LOBTree)
root := rootObj.POid()
files, ok := δFtail.fileIdx[root]
if !ok {
files = setOid{}
δFtail.fileIdx[roid] = files
δFtail.fileIdx[root] = files
}
files.Add(foid)
δftail, ok := δFtail.byFile[foid]
if !ok {
δftail = &_ΔFileTail{root: roid, vδE: nil /*will need to be rebuilt to past till tail*/}
δftail = &_ΔFileTail{root: root, vδE: nil /*will need to be rebuilt to past till tail*/}
δFtail.byFile[foid] = δftail
δFtail.trackNew.Add(foid)
}
if δftail.root != roid {
if δftail.root != root {
// .root can change during epochs, but in between them it must be stable
panicf("BUG: zfile<%s> root mutated from %s -> %s", foid, δftail.root, roid)
panicf("BUG: zfile<%s> root mutated from %s -> %s", foid, δftail.root, root)
}
......@@ -254,13 +254,13 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
δFtail.trackSetZBlk[zoid] = zt
}
inblk, ok := zt.inroot[roid]
inblk, ok := zt.inroot[root]
if !ok {
inblk = make(setI64, 1)
if zt.inroot == nil {
zt.inroot = make(map[zodb.Oid]setI64)
}
zt.inroot[roid] = inblk
zt.inroot[root] = inblk
}
inblk.Add(blk)
}
......
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