Commit 8b0d5744 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4d25e431
......@@ -328,7 +328,7 @@ func (m *Master) main(ctx context.Context) (err error) {
continue // -> recovery
}
// XXX shutdown request ?
// TODO shutdown request ?
}
return ctx.Err()
......@@ -342,7 +342,7 @@ func (m *Master) main(ctx context.Context) (err error) {
// - accept connections from storage nodes
// - retrieve and recover latest previously saved partition table from storages
// - 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
// table saved to them (empty new cluster case).
......@@ -352,7 +352,7 @@ type storRecovery struct {
partTab *xneo.PartitionTable
err error
// XXX + backup_tid, truncate_tid ?
// TODO + backup_tid, truncate_tid
// XXX naming cont? continue? unlock? unpause?
ack chan struct{} // main -> storCtlRecovery "thanks; please continue" XXX explain why
......@@ -373,7 +373,7 @@ func (m *Master) recovery(ctx context.Context) (err error) {
recoveredq := make(chan storRecovery) // <- result of 1 stor recovery
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
startReqv := []chan error{}
defer func() {
......@@ -424,7 +424,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
}
}
// TODO (?) set cluster state = RECOVERY
// TODO down clients
// goStorCtlRecovery spawns recovery task on a storage peer.
......@@ -485,7 +484,7 @@ func (m *Master) recovery(ctx context.Context) (err error) {
case <-ctxDone:
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
case ech := <-ctlStart:
if readyToStart {
......@@ -562,7 +561,6 @@ func (m *Master) recovery(ctx context.Context) (err error) {
// if we are starting for new cluster - create partition table
if m.node.State.PartTab.PTid == 0 {
// XXX -> m.nodeTab.StorageList(State > DOWN)
storv := []*xneo.PeerNode{}
for _, stor := range m.node.State.NodeTab.StorageList() {
if stor.State > proto.DOWN {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment