Commit 89dd3865 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 88a26456
......@@ -463,7 +463,7 @@ func (bf *zBigFileState) PySetState(pystate interface{}) (err error) {
// - max(_.serial for _ in ZBlk(#blk), all BTree/Bucket that lead to ZBlk)
// which provides a rough upper-bound estimate for file[blk] revision.
//
// XXX load into user-provided buf.
// TODO load into user-provided buf.
func (bf *ZBigFile) LoadBlk(ctx context.Context, blk int64) (_ []byte, treePath []btree.LONode, zblk zBlk, blkRevMax zodb.Tid, err error) {
defer xerr.Contextf(&err, "bigfile %s: loadblk %d", bf.POid(), blk)
......@@ -508,7 +508,6 @@ func (bf *ZBigFile) LoadBlk(ctx context.Context, blk int64) (_ []byte, treePath
blkdata = d
}
//log.Printf("ZBigFile.loadblk(%d) -> %dB", blk, len(blkdata))
return blkdata, treePath, zblk, blkRevMax, nil
}
......@@ -524,12 +523,9 @@ func (bf *ZBigFile) Size(ctx context.Context) (_ int64, treePath []btree.LONode,
}
defer bf.PDeactivate()
//fmt.Printf("\n\n\nSize ...\n")
tailblk, ok, err := bf.blktab.VMaxKey(ctx, func(node btree.LONode) {
//fmt.Printf("visit %v\n", node)
treePath = append(treePath, node)
})
//fmt.Printf("end Size (%v)\n", treePath)
if err != nil{
return 0, 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