Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
34b85fe0
Commit
34b85fe0
authored
Feb 18, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7aa13998
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
32 deletions
+0
-32
go/neo/master.go
go/neo/master.go
+0
-32
No files found.
go/neo/master.go
View file @
34b85fe0
...
@@ -390,7 +390,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
...
@@ -390,7 +390,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
recoveredq
:=
make
(
chan
storRecovery
)
// <- result of 1 stor recovery
recoveredq
:=
make
(
chan
storRecovery
)
// <- result of 1 stor recovery
inprogress
:=
0
// in-progress stor recoveries
inprogress
:=
0
// in-progress stor recoveries
// wg := &sync.WaitGroup{}
// requests to .ctlStart received when readyToStart
// requests to .ctlStart received when readyToStart
// on success answered when full recovery completes
// on success answered when full recovery completes
...
@@ -450,9 +449,7 @@ func (m *Master) recovery(ctx context.Context) (err error) {
...
@@ -450,9 +449,7 @@ 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
++
// 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
()
...
@@ -568,35 +565,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
...
@@ -568,35 +565,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
}
}
}
}
/*
// wait all workers to finish (which should come without delay since it was cancelled)
// XXX not good - some of the rest of the storages can fail in the
// meantime and this will lead to partTab to become non-opertional.
// XXX also: some of the recoveries could still _succeed_ (e.g.
// successfuly recovery send was already queued to recoveredq but not
// yet received) - this successful recovery could bring us newer
// partTab fro which we should reconsider whether we have all needed
// nodes up and running.
done := make(chan struct{})
go func() {
wg.Wait()
close(done)
}()
loop2:
for {
select {
case r := <-recoveredq:
close(r.ack)
log.Error(ctx, r.err)
case <-done:
break loop2
}
}
*/
if
err
!=
nil
{
if
err
!=
nil
{
return
err
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