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 ...@@ -224,24 +224,24 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
} }
δFtail.δBtail.Track(blk, path) δFtail.δBtail.Track(blk, path)
root := path[0].(*btree.LOBTree) rootObj := path[0].(*btree.LOBTree)
roid := root.POid() root := rootObj.POid()
files, ok := δFtail.fileIdx[roid] files, ok := δFtail.fileIdx[root]
if !ok { if !ok {
files = setOid{} files = setOid{}
δFtail.fileIdx[roid] = files δFtail.fileIdx[root] = files
} }
files.Add(foid) files.Add(foid)
δftail, ok := δFtail.byFile[foid] δftail, ok := δFtail.byFile[foid]
if !ok { 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.byFile[foid] = δftail
δFtail.trackNew.Add(foid) δ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 // .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 ...@@ -254,13 +254,13 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
δFtail.trackSetZBlk[zoid] = zt δFtail.trackSetZBlk[zoid] = zt
} }
inblk, ok := zt.inroot[roid] inblk, ok := zt.inroot[root]
if !ok { if !ok {
inblk = make(setI64, 1) inblk = make(setI64, 1)
if zt.inroot == nil { if zt.inroot == nil {
zt.inroot = make(map[zodb.Oid]setI64) zt.inroot = make(map[zodb.Oid]setI64)
} }
zt.inroot[roid] = inblk zt.inroot[root] = inblk
} }
inblk.Add(blk) 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