Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
31f4e061
Commit
31f4e061
authored
Feb 12, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b84a150b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
go/neo/master.go
go/neo/master.go
+17
-9
No files found.
go/neo/master.go
View file @
31f4e061
...
@@ -418,8 +418,9 @@ func (m *Master) recovery(ctx context.Context) (err error) {
...
@@ -418,8 +418,9 @@ func (m *Master) recovery(ctx context.Context) (err error) {
// goStorCtlRecovery spawns recovery task on a storage peer.
// goStorCtlRecovery spawns recovery task on a storage peer.
goStorCtlRecovery
:=
func
(
stor
*
_MasteredPeer
)
{
goStorCtlRecovery
:=
func
(
stor
*
_MasteredPeer
)
{
inprogress
++
inprogress
++
// XXX wg.Add(1) + defer wg.Done() ?
wg
.
Add
(
1
)
stor
.
wg
.
Go
(
func
(
peerCtx
context
.
Context
)
error
{
stor
.
wg
.
Go
(
func
(
peerCtx
context
.
Context
)
error
{
defer
wg
.
Done
()
ctx
,
cancel
:=
xxcontext
.
Merge
/*Cancel*/
(
ctx
,
peerCtx
)
ctx
,
cancel
:=
xxcontext
.
Merge
/*Cancel*/
(
ctx
,
peerCtx
)
defer
cancel
()
defer
cancel
()
...
@@ -655,20 +656,27 @@ func (m *Master) verify(ctx context.Context) (err error) {
...
@@ -655,20 +656,27 @@ func (m *Master) verify(ctx context.Context) (err error) {
// NOTE we don't reset m.lastOid / m.lastTid to 0 in the beginning of verification
// NOTE we don't reset m.lastOid / m.lastTid to 0 in the beginning of verification
// XXX (= py), rationale=?
// XXX (= py), rationale=?
// goStorCtlVerify spawns verify task on a storage peer.
goStorCtlVerify
:=
func
(
stor
*
_MasteredPeer
)
{
goStorCtlVerify
:=
func
(
stor
*
_MasteredPeer
)
{
// XXX rework
inprogress
++
inprogress
++
wg
.
Add
(
1
)
wg
.
Add
(
1
)
go
func
()
{
stor
.
wg
.
Go
(
func
(
peerCtx
context
.
Context
)
error
{
defer
wg
.
Done
()
defer
wg
.
Done
()
err
:=
m
.
accept
(
node
,
state0
,
n
.
req
,
resp
)
var
...
if
err
!=
nil
{
err
:=
stor
.
run
(
ctx
,
func
()
error
{
verifyq
<-
storVerify
{
stor
:
node
,
err
:
err
}
...
=
storCtlVerify
(
ctx
,
stor
,
m
.
node
.
State
.
PartTab
)
return
})
}
storCtlVerify
(
ctx
,
node
,
m
.
node
.
State
.
PartTab
,
verifyq
)
ack
:=
make
(
chan
struct
{})
verifyq
<-
storVerify
{
stor
:
stor
,
...
}
<-
ack
// canceled verify does not mean we should down the storage node
if
xcontext
.
Canceled
(
err
)
{
err
=
nil
}
return
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