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
c187f0ba
Commit
c187f0ba
authored
Aug 10, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5ed9cbc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
wcfs/zblk.go
wcfs/zblk.go
+20
-19
No files found.
wcfs/zblk.go
View file @
c187f0ba
...
@@ -140,8 +140,26 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
...
@@ -140,8 +140,26 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
wg
,
ctx
:=
errgroup
.
WithContext
(
ctx
)
wg
,
ctx
:=
errgroup
.
WithContext
(
ctx
)
// loadBucket loads all ZData objects from leaf BTree bucket.
loadBucket
:=
func
(
b
*
btree
.
Bucket
)
error
{
err
:=
b
.
PActivate
(
ctx
)
if
err
!=
nil
{
return
err
}
defer
b
.
PDeactivate
()
// XXX go through all bucket key/v -> chunktab
// XXX off < 0 !ok
// XXX off + len > blksize !ok
return
nil
}
// loadBTree spawns loading of all BTree children.
// loadBTree spawns loading of all BTree children.
loadBTree
:=
func
(
t
*
btree
.
BTree
)
error
{
var
loadBTree
func
(
t
*
btree
.
BTree
)
error
loadBTree
=
func
(
t
*
btree
.
BTree
)
error
{
err
:=
t
.
PActivate
(
ctx
)
err
:=
t
.
PActivate
(
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
...
@@ -152,7 +170,7 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
...
@@ -152,7 +170,7 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
switch
child
:=
e
.
Child
()
.
(
type
)
{
switch
child
:=
e
.
Child
()
.
(
type
)
{
case
*
btree
.
BTree
:
case
*
btree
.
BTree
:
wg
.
Go
(
func
()
error
{
wg
.
Go
(
func
()
error
{
return
loadB
t
ree
(
child
)
return
loadB
T
ree
(
child
)
})
})
case
*
btree
.
Bucket
:
case
*
btree
.
Bucket
:
...
@@ -168,23 +186,6 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
...
@@ -168,23 +186,6 @@ func (zb *ZBlk1) LoadBlkData(ctx context.Context) ([]byte, error) {
return
nil
return
nil
}
}
// loadBucket loads all ZData objects from leaf BTree bucket.
loadBucket
:=
func
(
b
*
btree
.
Bucket
)
error
{
err
:=
b
.
PActivate
(
ctx
)
if
err
!=
nil
{
return
err
}
defer
b
.
PDeactivate
()
// XXX go through all bucket key/v -> chunktab
// XXX off < 0 !ok
// XXX off + len > blksize !ok
return
nil
}
loadBTree
(
zb
.
chunktab
)
// XXX err
loadBTree
(
zb
.
chunktab
)
// XXX err
...
...
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