Skip to content

Commit

Permalink
bug: fix node shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
coufalja committed Jan 16, 2024
1 parent e9a43ae commit f2c0922
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storage/engine_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
func (e *Engine) dispatchEvents() {
for {

Check failure on line 10 in storage/engine_events.go

View workflow job for this annotation

GitHub Actions / golangci

S1000: should use for range instead of for { select {} } (gosimple)
select {
case <-e.stop:
return
case evt := <-e.eventsCh:
e.log.Infof("raft: %T %+v", evt, evt)
switch ev := evt.(type) {
case leaderUpdated, nodeUnloaded, membershipChanged, nodeHostShuttingDown:
case nodeHostShuttingDown:
return
case leaderUpdated, nodeUnloaded, membershipChanged:
e.Cluster.Notify()
case nodeReady:
if ev.ReplicaID == e.cfg.NodeID && e.LogCache != nil {
Expand Down

0 comments on commit f2c0922

Please sign in to comment.