Commit 16bd9797 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5cb986db
......@@ -162,16 +162,26 @@ func (δb *ΔTail) Tail() zodb.Tid {
// XXX objects in path must be with .PJar().At() == .head
// XXX path -> []oid ?
func (δb *ΔTail) Track(path []Node) { // XXX Tree|Bucket; path[0] = root
/*
root = path[0]
for obj in path:
if not obj in trackIdx:
.trackNew += obj
.trackIdx[obj] += root
XXX update diff XXX here? or as separate step?
XXX update lastRevOf
*/
l := len(path)
if l == 0 {
panic("empty path")
}
root := path[0].(*Tree)
// XXX assert Tree Tree ... Tree Bucket
for _, node := range path {
oid := node.POid()
nodeRoots, ok := δb.trackIdx[oid]
if !ok {
nodeRoots = make(SetTree)
δb.trackIdx[oid] = nodeRoots
// XXX .trackNew += oid
}
nodeRoots.Add(root)
}
// XXX update diff XXX here? or as separate step?
// XXX update lastRevOf
}
// Update updates δB with per-object level ZODB changes.
......
......@@ -522,7 +522,7 @@ type BigFile struct {
rev zodb.Tid // last revision that modified zfile data
// // tail change history of this file.
// δtail *ΔTailI64 // [](rev↑, []#blk)
δtail *ΔTailI64 // [](rev↑, []#blk) XXX kill
// inflight loadings of ZBigFile from ZODB.
// successful load results are kept here until blkdata is put into OS pagecache.
......@@ -1696,8 +1696,8 @@ func (head *Head) bigopen(ctx context.Context, oid zodb.Oid) (_ *BigFile, err er
size: size,
rev: rev,
// XXX this is needed only for head/
δtail: NewΔTailI64(zconn.At()),
// // XXX this is needed only for head/
// δtail: NewΔTailI64(zconn.At()),
loading: make(map[int64]*blkLoadState),
}
......
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