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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
1ca427c0
Commit
1ca427c0
authored
May 30, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
71f7d77e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
go/neo/master.go
go/neo/master.go
+10
-6
No files found.
go/neo/master.go
View file @
1ca427c0
...
...
@@ -154,7 +154,7 @@ func (m *Master) xxx(ctx ...) {
}
// run implements main master cluster management logic: node tracking, cluster
// run i
s a process which i
mplements main master cluster management logic: node tracking, cluster
// state updates, scheduling data movement between storage nodes etc
func
(
m
*
Master
)
run
(
ctx
context
.
Context
)
{
...
...
@@ -216,10 +216,12 @@ func (m *Master) run(ctx context.Context) {
// - monitor whether partition table becomes operational wrt currently up nodeset
// - if yes - finish recovering upon receiving "start" command
// recovery
is a process that drives cluster via
recovery phase
// recovery
drives cluster during
recovery phase
//
// NOTE during recovery phase `recovery()` owns .partTab and .nodeTab XXX or is the only mutator ?
func
(
m
*
Master
)
recovery
(
ctx
context
.
Context
)
{
// when recovery finishes error indicates:
// - nil: recovery was ok and a command came for cluster to start
// - !nil: recovery was cancelled
func
(
m
*
Master
)
recovery
(
ctx
context
.
Context
)
error
{
recovery
:=
make
(
chan
storRecovery
)
rctx
,
rcancel
:=
context
.
WithCancel
(
ctx
)
defer
rcancel
()
...
...
@@ -286,7 +288,7 @@ loop:
rcancel
()
defer
func
()
{
s
<-
nil
c
.
resp
<-
nil
}()
break
loop
}
...
...
@@ -297,7 +299,7 @@ loop:
c
.
resp
<-
nil
// we are already recovering
case
<-
ctx
.
Done
()
:
// XXX
err
=
ctx
.
Err
()
break
loop
}
}
...
...
@@ -306,6 +308,8 @@ loop:
for
;
inprogress
>
0
;
inprogress
--
{
<-
recovery
}
// XXX err
}
// storRecovery is result of a storage node passing recovery phase
...
...
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