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
62cc33a5
Commit
62cc33a5
authored
May 29, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e2630ae4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
go/neo/master.go
go/neo/master.go
+8
-7
No files found.
go/neo/master.go
View file @
62cc33a5
...
...
@@ -96,8 +96,9 @@ var tstart time.Time = time.Now()
// state updates, scheduling data movement between storage nodes etc
func
(
m
*
Master
)
run
(
ctx
context
.
Context
)
{
// current function to ask/control a storage depending on current cluster state
and master idea
// current function to ask/control a storage depending on current cluster state
// + associated context covering all storage nodes
// XXX + waitgroup ?
storCtl
:=
m
.
storCtlRecovery
storCtlCtx
,
storCtlCancel
:=
context
.
WithCancel
(
ctx
)
...
...
@@ -115,13 +116,10 @@ func (m *Master) run(ctx context.Context) {
}
// new storage node joined cluster
switch
m
.
clusterState
{
case
RECOVERING
:
}
// XXX consider .clusterState change
// launch current storage control work on the
new
node
// launch current storage control work on the
joined
node
go
storCtl
(
storCtlCtx
,
n
.
link
)
// TODO consider adjusting partTab
...
...
@@ -136,8 +134,10 @@ func (m *Master) run(ctx context.Context) {
if
r
.
partTab
.
ptid
>
m
.
partTab
.
ptid
{
m
.
partTab
=
r
.
partTab
// XXX also transfer subscribers ?
// XXX
or during recovery no one must be subscribed to partTab ?
// XXX
-> during recovery no one must be subscribed to partTab
}
// XXX consider clusterState change
}
}
...
...
@@ -234,6 +234,7 @@ func (m *Master) storCtlRecovery(ctx context.Context, link *NodeLink) {
if
err
!=
nil
{
return
}
// XXX cancel on ctx
recovery
:=
AnswerRecovery
{}
err
=
Ask
(
conn
,
&
Recovery
{},
&
recovery
)
...
...
@@ -311,7 +312,7 @@ func (m *Master) ServeLink(ctx context.Context, link *NodeLink) {
}()
// identify
// XXX
add logic to verify/assign nodeID and do other requested identification checks
// XXX
-> change to use nodeCome
nodeInfo
,
err
:=
IdentifyPeer
(
link
,
MASTER
)
if
err
!=
nil
{
fmt
.
Printf
(
"master: %v
\n
"
,
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