Commit a34148fe authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0d2aec32
......@@ -470,7 +470,7 @@ func (bf *BigFile) Read(_ nodefs.File, dest []byte, off int64, _ fuse.Context) (
// zodbCacheControl implements LiveCacheControl to tune ZODB to never evict
// ZBTree/ZBucket from live cache. We want to keep ZBTree/ZBucket always alive
// LOBTree/LOBucket from live cache. We want to keep LOBTree/LOBucket always alive
// becuse it is essentially the index where to find ZBigFile data.
//
// For the data itself - we put it to kernel cache and always deactivate from
......@@ -484,8 +484,8 @@ func (cc *zodbCacheControl) WantEvict(obj zodb.IPersistent) bool {
default:
return true
case *btree.BTree:
case *btree.Bucket:
case *btree.LOBTree:
case *btree.LOBucket:
}
return false
......
......@@ -105,7 +105,7 @@ func (zd *zDataState) PySetState(pystate interface{}) error {
type ZBlk1 struct {
zodb.Persistent
chunktab *btree.BTree // {} offset -> ZData(chunk)
chunktab *btree.IOBTree // {} offset -> ZData(chunk)
}
type zBlk1State ZBlk1 // hide state methods from public API
......@@ -115,10 +115,10 @@ func (zb *zBlk1State) DropState() {
}
func (zb *zBlk1State) PySetState(pystate interface{}) error {
chunktab, ok := pystate.(*btree.BTree)
chunktab, ok := pystate.(*btree.IOBTree)
if !ok {
//return fmt.Errorf("expect BTree; got %T", pystate)
return fmt.Errorf("expect BTree; got %#v", pystate)
//return fmt.Errorf("expect IOBTree; got %T", pystate)
return fmt.Errorf("expect IOBTree; got %#v", pystate)
}
zb.chunktab = chunktab
......@@ -180,7 +180,7 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
}
// loadBucket loads all ZData objects from leaf BTree bucket.
loadBucket := func(b *btree.Bucket) error {
loadBucket := func(b *btree.IOBucket) error {
err := b.PActivate(ctx)
if err != nil {
return err
......@@ -208,8 +208,8 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
// loadBTree spawns loading of all BTree children.
var loadBTree func(t *btree.BTree) error
loadBTree = func(t *btree.BTree) error {
var loadBTree func(t *btree.IOBTree) error
loadBTree = func(t *btree.IOBTree) error {
err := t.PActivate(ctx)
if err != nil {
return err
......@@ -220,12 +220,12 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
for _, e := range t.Entryv() {
switch child := e.Child().(type) {
case *btree.BTree:
case *btree.IOBTree:
wg.Go(func() error {
return loadBTree(child)
})
case *btree.Bucket:
case *btree.IOBucket:
wg.Go(func() error {
return loadBucket(child)
})
......@@ -299,7 +299,7 @@ type ZBigFile struct {
zodb.Persistent
blksize int64
blktab *btree.BTree // LOBtree{} blk -> ZBlk*(blkdata)
blktab *btree.LOBTree // {} blk -> ZBlk*(blkdata)
}
type zBigFileState ZBigFile // hide state methods from public API
......@@ -332,9 +332,9 @@ func (bf *zBigFileState) PySetState(pystate interface{}) (err error) {
return fmt.Errorf("blksize: expect integer; got %T", t[0])
}
blktab, ok := t[1].(*btree.BTree)
blktab, ok := t[1].(*btree.LOBTree)
if !ok {
return fmt.Errorf("blktab: expect BTree; got %T", t[1])
return fmt.Errorf("blktab: expect LOBTree; got %T", t[1])
}
bf.blksize = 0 // XXX blksize
......
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