Commit b211c7b2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 587aa7af
...@@ -354,8 +354,7 @@ type storRecovery struct { ...@@ -354,8 +354,7 @@ type storRecovery struct {
// TODO + backup_tid, truncate_tid // TODO + backup_tid, truncate_tid
// XXX naming cont? continue? unlock? unpause? ack chan struct{} // main -> goStorCtlRecovery "thanks; please continue"
ack chan struct{} // main -> storCtlRecovery "thanks; please continue" XXX explain why
} }
// recovery drives cluster during recovery phase. // recovery drives cluster during recovery phase.
...@@ -526,7 +525,7 @@ func (m *Master) recovery(ctx context.Context) (err error) { ...@@ -526,7 +525,7 @@ func (m *Master) recovery(ctx context.Context) (err error) {
// a storage node came through recovery - let's see whether // a storage node came through recovery - let's see whether
// ptid ↑ and if so we should take partition table from there // ptid ↑ and if so we should take partition table from there
case r := <-recoveredq: case r := <-recoveredq:
close(r.ack) // for <-"node leave" to happen after <-recovery in case of err close(r.ack) // for <-"node leave" to happen after <-recoveredq in case of err
inprogress-- inprogress--
if r.err != nil { if r.err != nil {
...@@ -736,7 +735,7 @@ func (m *Master) verify(ctx context.Context) (err error) { ...@@ -736,7 +735,7 @@ func (m *Master) verify(ctx context.Context) (err error) {
// //
// TODO actually implement logic to decide to finish/rollback transactions // TODO actually implement logic to decide to finish/rollback transactions
case v := <-verifiedq: case v := <-verifiedq:
close(v.ack) // XXX explain why (see recovery) close(v.ack) // for <-"node leave" to happen after <-verifiedq in case of err
inprogress-- inprogress--
if v.err != nil { if v.err != nil {
...@@ -773,7 +772,7 @@ type storVerify struct { ...@@ -773,7 +772,7 @@ type storVerify struct {
lastTid zodb.Tid lastTid zodb.Tid
err error err error
ack chan struct{} ack chan struct{} // main -> goStorCtlVerify "thanks; please continue"
} }
// storCtlVerify drives a storage node during cluster verifying (= starting) state. // storCtlVerify drives a storage node during cluster verifying (= starting) state.
...@@ -832,7 +831,7 @@ type serveDone struct { ...@@ -832,7 +831,7 @@ type serveDone struct {
peer *_MasteredPeer peer *_MasteredPeer
err error err error
ack chan struct{} ack chan struct{} // main -> goServe "thanks; please continue"
} }
// serve drives cluster during running state. // serve drives cluster during running state.
...@@ -942,7 +941,7 @@ func (m *Master) serve(ctx context.Context) (err error) { ...@@ -942,7 +941,7 @@ func (m *Master) serve(ctx context.Context) (err error) {
// serving a peer is done // serving a peer is done
case d := <-servedq: case d := <-servedq:
close(d.ack) // XXX explain why (see recovery) close(d.ack) // for <-"node leave" to happen after <-servedq in case of err
inprogress-- inprogress--
if d.err != nil { if d.err != nil {
......
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