Commit 73811795 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e8804bd5
......@@ -664,7 +664,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
// head
root = headRoot
head = δFtail.Head()
for zblk, zt := range δFtail.trackSetZBlk {
for zblk, zt := range δFtail.trackSetZBlk { // XXX locking
inblk, ok := zt.inroot[root]
if ok {
Zinblk[zblk] = inblk.Clone()
......@@ -847,16 +847,12 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zfile *ZBigFile, blk int6
panicf("zconn.at out of bounds: zconn.at: @%s, (tail, head] = (@%s, @%s]", zconnAt, tail, head)
}
// XXX locking
// δftail, err := δFtail.rebuild1IfNeeded(foid)
vδE, headRoot, err := δFtail.rebuild1IfNeeded(foid)
if err != nil {
return zodb.InvalidTid, false, err
}
// find epoch that covers at and associated blktab root/object
// vδE := δftail.vδE
//fmt.Printf(" vδE: %v\n", vδE)
l := len(vδE)
i := sort.Search(l, func(i int) bool {
......@@ -868,7 +864,6 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zfile *ZBigFile, blk int6
// root
var root zodb.Oid
if i == l {
// root = δftail.root
root = headRoot
} else {
root = vδE[i].oldRoot
......@@ -879,7 +874,7 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zfile *ZBigFile, blk int6
i--
if i < 0 {
// i<0 - first epoch (no explicit start) - use δFtail.tail as lo
epoch = δFtail.Tail()
epoch = tail
} else {
epoch = vδE[i].Rev
}
......@@ -948,9 +943,7 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zfile *ZBigFile, blk int6
// ---- vδEBuild (rebuild core) ----
// vδEBuild builds vδE from vδZ for file.
//
// XXX place ok?
// vδEBuild builds vδE for file from vδZ.
func vδEBuild(foid zodb.Oid, δZtail *zodb.ΔTail, db *zodb.DB) (vδE []_ΔFileEpoch, err error) {
defer xerr.Contextf(&err, "file<%s>: build vδE", foid)
......
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