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
8b0d5744
Commit
8b0d5744
authored
Feb 18, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4d25e431
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
go/neo/master.go
go/neo/master.go
+5
-7
No files found.
go/neo/master.go
View file @
8b0d5744
...
@@ -328,7 +328,7 @@ func (m *Master) main(ctx context.Context) (err error) {
...
@@ -328,7 +328,7 @@ func (m *Master) main(ctx context.Context) (err error) {
continue
// -> recovery
continue
// -> recovery
}
}
//
XXX
shutdown request ?
//
TODO
shutdown request ?
}
}
return
ctx
.
Err
()
return
ctx
.
Err
()
...
@@ -342,7 +342,7 @@ func (m *Master) main(ctx context.Context) (err error) {
...
@@ -342,7 +342,7 @@ func (m *Master) main(ctx context.Context) (err error) {
// - accept connections from storage nodes
// - accept connections from storage nodes
// - retrieve and recover latest previously saved partition table from storages
// - retrieve and recover latest previously saved partition table from storages
// - monitor whether partition table becomes operational wrt currently up nodeset
// - monitor whether partition table becomes operational wrt currently up nodeset
// - if yes - finish recovering upon receiving "start" command
XXX
or autostart
// - if yes - finish recovering upon receiving "start" command
TODO
or autostart
// - start is also allowed if storages connected and say there is no partition
// - start is also allowed if storages connected and say there is no partition
// table saved to them (empty new cluster case).
// table saved to them (empty new cluster case).
...
@@ -352,7 +352,7 @@ type storRecovery struct {
...
@@ -352,7 +352,7 @@ type storRecovery struct {
partTab
*
xneo
.
PartitionTable
partTab
*
xneo
.
PartitionTable
err
error
err
error
//
XXX + backup_tid, truncate_tid ?
//
TODO + backup_tid, truncate_tid
// XXX naming cont? continue? unlock? unpause?
// XXX naming cont? continue? unlock? unpause?
ack
chan
struct
{}
// main -> storCtlRecovery "thanks; please continue" XXX explain why
ack
chan
struct
{}
// main -> storCtlRecovery "thanks; please continue" XXX explain why
...
@@ -373,7 +373,7 @@ func (m *Master) recovery(ctx context.Context) (err error) {
...
@@ -373,7 +373,7 @@ 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
// requests to .ctlStart received when readyToStart
// requests to .ctlStart received when readyToStart
=y
// on success answered when full recovery completes
// on success answered when full recovery completes
startReqv
:=
[]
chan
error
{}
startReqv
:=
[]
chan
error
{}
defer
func
()
{
defer
func
()
{
...
@@ -424,7 +424,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
...
@@ -424,7 +424,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
}
}
}
}
// TODO (?) set cluster state = RECOVERY
// TODO down clients
// TODO down clients
// goStorCtlRecovery spawns recovery task on a storage peer.
// goStorCtlRecovery spawns recovery task on a storage peer.
...
@@ -485,7 +484,7 @@ func (m *Master) recovery(ctx context.Context) (err error) {
...
@@ -485,7 +484,7 @@ func (m *Master) recovery(ctx context.Context) (err error) {
case
<-
ctxDone
:
case
<-
ctxDone
:
stop
(
ctx
.
Err
())
stop
(
ctx
.
Err
())
// request to start the cluster - if ok we
exit replying ok
// request to start the cluster - if ok we
queue it to reply ok on successful exit
// if not ok - we just reply not ok
// if not ok - we just reply not ok
case
ech
:=
<-
ctlStart
:
case
ech
:=
<-
ctlStart
:
if
readyToStart
{
if
readyToStart
{
...
@@ -562,7 +561,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
...
@@ -562,7 +561,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
// if we are starting for new cluster - create partition table
// if we are starting for new cluster - create partition table
if
m
.
node
.
State
.
PartTab
.
PTid
==
0
{
if
m
.
node
.
State
.
PartTab
.
PTid
==
0
{
// XXX -> m.nodeTab.StorageList(State > DOWN)
storv
:=
[]
*
xneo
.
PeerNode
{}
storv
:=
[]
*
xneo
.
PeerNode
{}
for
_
,
stor
:=
range
m
.
node
.
State
.
NodeTab
.
StorageList
()
{
for
_
,
stor
:=
range
m
.
node
.
State
.
NodeTab
.
StorageList
()
{
if
stor
.
State
>
proto
.
DOWN
{
if
stor
.
State
>
proto
.
DOWN
{
...
...
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