Commit 94389dd3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0ba8cc2e
......@@ -498,7 +498,6 @@ type blkLoadState struct {
ready chan struct{}
blkdata []byte
treepath []zodb.IPersistent // LOBTree LOBTree ... LOBucket
err error
}
......@@ -1159,10 +1158,20 @@ func (f *BigFile) readBlk(ctx context.Context, blk int64, dest []byte) error {
zbf := f.zbf
blkdata, treepath, err := zbf.LoadBlk(ctx, blk) // XXX -> +blkrevmax1
loading.blkdata = blkdata
loading.treepath = treepath
loading.err = err
close(loading.ready)
_ = treepath
/*
blkrevmax := zodb.Tid(0)
for __, node := range treepath {
node.PActivate() // XXX err
blkrevmax = max(_, node.PSerial())
node.PDeactivate()
}
*/
// XXX before loading.ready?
blkrevmax2, _ := f.δFtail.LastRevOf(blk, zbf.PJar().At())
//revmax := min(blkrevmax1, blkrevmax2)
......
......@@ -452,6 +452,7 @@ func (bf *ZBigFile) LoadBlk(ctx context.Context, blk int64) (_ []byte, treePath
}
defer bf.PDeactivate()
// XXX -> GetTo(callback(node) - use node.PSerial to build maxrev + treepath)
xzblk, ok, treev, bucket, err := bf.blktab.GetTo(ctx, blk)
if err != nil {
return nil, nil, err
......
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