Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
802b502e
Commit
802b502e
authored
Jul 01, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
01b98455
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
wcfs/internal/xbtree/xbtreetest/init/init.go
wcfs/internal/xbtree/xbtreetest/init/init.go
+10
-10
wcfs/internal/xbtree/δbtail_test.go
wcfs/internal/xbtree/δbtail_test.go
+1
-1
No files found.
wcfs/internal/xbtree/xbtreetest/init/init.go
View file @
802b502e
...
...
@@ -30,14 +30,14 @@ import (
"lab.nexedi.com/kirr/go123/xerr"
"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/zdata"
)
type
Tree
=
xbtree
.
Tree
type
Node
=
xbtree
.
Node
type
Key
=
xbtree
.
Key
type
Tree
=
xbtree
test
.
Tree
type
Node
=
xbtree
test
.
Node
type
Key
=
xbtree
test
.
Key
type
ZBlk
=
zdata
.
ZBlk
...
...
@@ -64,12 +64,12 @@ func ztreeGetBlk(ctx context.Context, ztree *Tree, k Key) (zblk ZBlk, ok bool, p
func
init
()
{
xbtree
.
ZTreeGetBlkData
=
ZTreeGetBlkData
xbtree
.
ZGetBlkData
=
ZGetBlkData
xbtree
test
.
ZTreeGetBlkData
=
_
ZTreeGetBlkData
xbtree
test
.
ZGetBlkData
=
_
ZGetBlkData
}
// 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
)
{
//
_
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
)
{
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
)
...
...
@@ -85,8 +85,8 @@ func ZTreeGetBlkData(ctx context.Context, ztree *Tree, k Key) (data string, ok b
return
string
(
bdata
),
true
,
path
,
nil
}
// 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
)
{
//
_
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
)
{
defer
xerr
.
Contextf
(
&
err
,
"@%s: get blkdata from obj %s"
,
zconn
.
At
(),
zblkOid
)
xblk
,
err
:=
zconn
.
Get
(
ctx
,
zblkOid
)
...
...
wcfs/internal/xbtree/δbtail_test.go
View file @
802b502e
...
...
@@ -91,7 +91,7 @@ func _trackSetWithCov(rbs xbtreetest.RBucketSet, tracked setKey, outKeyCover *bl
}
// trackSet explicitly records only regular buckets.
// embedded buckets all have oid=zodb.InvalidOid and would lead to z
newNode
:=
false
//
newNode := false
if
kb
.
Oid
!=
zodb
.
InvalidOid
{
trackSet
.
AddPath
(
kb
.
Path
())
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment