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
39bd3660
Commit
39bd3660
authored
May 30, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1786bc72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
go/neo/master.go
go/neo/master.go
+36
-0
No files found.
go/neo/master.go
View file @
39bd3660
...
@@ -179,6 +179,42 @@ func (m *Master) run(ctx context.Context) {
...
@@ -179,6 +179,42 @@ func (m *Master) run(ctx context.Context) {
_
=
storCtlCancel
// XXX
_
=
storCtlCancel
// XXX
}
}
// XXX draft: Cluster Recovery if []Stor is fixed
// NOTE during recovery phase `recovery()` owns m.partTab
// XXX what about .nodeTab ?
func
(
m
*
Master
)
recovery
(
ctx
context
.
Context
,
storv
[]
*
NodeLink
)
{
recovery
:=
make
(
chan
storRecovery
)
wg
:=
sync
.
WaitGroup
{}
for
_
,
stor
:=
range
storv
{
wg
.
Add
(
1
)
go
storCtlRecovery
(
ctx
,
wg
,
stor
,
recovery
)
}
loop
:
for
{
select
{
case
<-
ctx
.
Done
()
:
// XXX
break
loop
case
r
:=
<-
recovery
:
if
r
.
partTab
.
ptid
>
m
.
partTab
.
ptid
{
m
.
partTab
=
r
.
partTab
// XXX also transfer subscribers ?
// XXX -> during recovery no one must be subscribed to partTab
}
// TODO
}
}
// XXX consume left recovery responces
wg
.
Wait
()
}
// accept processes identification request of just connected node and either accepts or declines it
// accept processes identification request of just connected node and either accepts or declines it
// if node identification is accepted nodeTab is updated and corresponding nodeInfo is returned
// if node identification is accepted nodeTab is updated and corresponding nodeInfo is returned
func
(
m
*
Master
)
accept
(
n
nodeCome
)
(
nodeInfo
NodeInfo
,
ok
bool
)
{
func
(
m
*
Master
)
accept
(
n
nodeCome
)
(
nodeInfo
NodeInfo
,
ok
bool
)
{
...
...
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