Commit 70c8c3e0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b2c44675
...@@ -83,10 +83,8 @@ type ΔFtail struct { ...@@ -83,10 +83,8 @@ type ΔFtail struct {
// ΔFtail merges ΔBtail with history of ZBlk // ΔFtail merges ΔBtail with history of ZBlk
δBtail *xbtree.ΔBtail δBtail *xbtree.ΔBtail
fileIdx map[zodb.Oid]setOid // tree-root -> {} ZBigFile<oid> as of @head XXX -> root2file ? fileIdx map[zodb.Oid]setOid // tree-root -> {} ZBigFile<oid> as of @head XXX -> root2file ?
// rootIdx map[zodb.Oid]zodb.Oid // file -> tree-root as of @head
byFile map[zodb.Oid]*_ΔFileTail // file -> δf tail XXX byFile map[zodb.Oid]*_ΔFileTail // file -> δf tail XXX
// trackSetZFile setOid // set of tracked ZBigFiles as of @head
trackSetZBlk map[zodb.Oid]*zblkTrack // zblk -> {} root -> {}blk as of @head trackSetZBlk map[zodb.Oid]*zblkTrack // zblk -> {} root -> {}blk as of @head
} }
...@@ -135,8 +133,6 @@ func NewΔFtail(at0 zodb.Tid, db *zodb.DB) *ΔFtail { ...@@ -135,8 +133,6 @@ func NewΔFtail(at0 zodb.Tid, db *zodb.DB) *ΔFtail {
return &ΔFtail{ return &ΔFtail{
δBtail: xbtree.NewΔBtail(at0, db), δBtail: xbtree.NewΔBtail(at0, db),
fileIdx: map[zodb.Oid]setOid{}, fileIdx: map[zodb.Oid]setOid{},
// rootIdx: map[zodb.Oid]zodb.Oid{},
// trackSetZFile: setOid{},
byFile: map[zodb.Oid]*_ΔFileTail{}, byFile: map[zodb.Oid]*_ΔFileTail{},
trackSetZBlk: map[zodb.Oid]*zblkTrack{}, trackSetZBlk: map[zodb.Oid]*zblkTrack{},
} }
...@@ -191,8 +187,6 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb ...@@ -191,8 +187,6 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
} }
// δFtail.trackSetZFile.Add(foid)
// associate zblk with file, if it was not hole // associate zblk with file, if it was not hole
if zblk != nil { if zblk != nil {
zoid := zblk.POid() zoid := zblk.POid()
...@@ -362,7 +356,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) { ...@@ -362,7 +356,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
//fmt.Printf("δZBigFile: %v\n", δ) //fmt.Printf("δZBigFile: %v\n", δ)
// XXX update .fileIdx // XXX update .fileIdx
// XXX update .rootIdx
// XXX update .trackSetZBlk ? // XXX update .trackSetZBlk ?
} }
...@@ -472,7 +465,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado ...@@ -472,7 +465,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
// state of Zinblk as we are scanning ← // state of Zinblk as we are scanning ←
// initially corresponds to @head = vδT[-1] // initially corresponds to @head = vδT[-1]
Zinblk := map[zodb.Oid]setI64{} // zblk -> which #blk refer to it Zinblk := map[zodb.Oid]setI64{} // zblk -> which #blk refers to it
var ZinblkAt zodb.Tid // Zinblk covers [ZinblkAt,<next δT>) var ZinblkAt zodb.Tid // Zinblk covers [ZinblkAt,<next δT>)
for zblk, zt := range δFtail.trackSetZBlk { for zblk, zt := range δFtail.trackSetZBlk {
inblk, ok := zt.inroot[root] inblk, ok := zt.inroot[root]
......
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