Commit 802b502e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 01b98455
...@@ -30,14 +30,14 @@ import ( ...@@ -30,14 +30,14 @@ import (
"lab.nexedi.com/kirr/go123/xerr" "lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/neo/go/zodb" "lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree" "lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree/xbtreetest"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xzodb" "lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xzodb"
"lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/zdata" "lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/zdata"
) )
type Tree = xbtree.Tree type Tree = xbtreetest.Tree
type Node = xbtree.Node type Node = xbtreetest.Node
type Key = xbtree.Key type Key = xbtreetest.Key
type ZBlk = zdata.ZBlk type ZBlk = zdata.ZBlk
...@@ -64,12 +64,12 @@ func ztreeGetBlk(ctx context.Context, ztree *Tree, k Key) (zblk ZBlk, ok bool, p ...@@ -64,12 +64,12 @@ func ztreeGetBlk(ctx context.Context, ztree *Tree, k Key) (zblk ZBlk, ok bool, p
func init() { func init() {
xbtree.ZTreeGetBlkData = ZTreeGetBlkData xbtreetest.ZTreeGetBlkData = _ZTreeGetBlkData
xbtree.ZGetBlkData = ZGetBlkData xbtreetest.ZGetBlkData = _ZGetBlkData
} }
// ZTreeGetBlkData returns block data from block pointed to by ztree[k]. // _ZTreeGetBlkData returns block data from block pointed to by ztree[k].
func ZTreeGetBlkData(ctx context.Context, ztree *Tree, k Key) (data string, ok bool, path []Node, err error) { func _ZTreeGetBlkData(ctx context.Context, ztree *Tree, k Key) (data string, ok bool, path []Node, err error) {
defer xerr.Contextf(&err, "@%s: tree<%s>: get blkdata from [%d]", ztree.PJar().At(), ztree.POid(), k) defer xerr.Contextf(&err, "@%s: tree<%s>: get blkdata from [%d]", ztree.PJar().At(), ztree.POid(), k)
zblk, ok, path, err := ztreeGetBlk(ctx, ztree, k) zblk, ok, path, err := ztreeGetBlk(ctx, ztree, k)
...@@ -85,8 +85,8 @@ func ZTreeGetBlkData(ctx context.Context, ztree *Tree, k Key) (data string, ok b ...@@ -85,8 +85,8 @@ func ZTreeGetBlkData(ctx context.Context, ztree *Tree, k Key) (data string, ok b
return string(bdata), true, path, nil return string(bdata), true, path, nil
} }
// ZGetBlkData loads block data from ZBlk object specified by its oid. // _ZGetBlkData loads block data from ZBlk object specified by its oid.
func ZGetBlkData(ctx context.Context, zconn *zodb.Connection, zblkOid zodb.Oid) (data string, err error) { func _ZGetBlkData(ctx context.Context, zconn *zodb.Connection, zblkOid zodb.Oid) (data string, err error) {
defer xerr.Contextf(&err, "@%s: get blkdata from obj %s", zconn.At(), zblkOid) defer xerr.Contextf(&err, "@%s: get blkdata from obj %s", zconn.At(), zblkOid)
xblk, err := zconn.Get(ctx, zblkOid) xblk, err := zconn.Get(ctx, zblkOid)
......
...@@ -91,7 +91,7 @@ func _trackSetWithCov(rbs xbtreetest.RBucketSet, tracked setKey, outKeyCover *bl ...@@ -91,7 +91,7 @@ func _trackSetWithCov(rbs xbtreetest.RBucketSet, tracked setKey, outKeyCover *bl
} }
// trackSet explicitly records only regular buckets. // trackSet explicitly records only regular buckets.
// embedded buckets all have oid=zodb.InvalidOid and would lead to z // embedded buckets all have oid=zodb.InvalidOid and would lead to z
newNode := false // newNode := false
if kb.Oid != zodb.InvalidOid { if kb.Oid != zodb.InvalidOid {
trackSet.AddPath(kb.Path()) trackSet.AddPath(kb.Path())
/* /*
......
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