Skip to content

Commit

Permalink
op-conductor: Fix deadlock in shutdown (#10728)
Browse files Browse the repository at this point in the history
* op-conductor: Fix deadlock in shutdown

* op-e2e: Unskip test

* Return early

* Remove unnecessary for loop
  • Loading branch information
ajsutton committed Jun 4, 2024
1 parent f0977b5 commit e19b3ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion op-conductor/health/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,13 @@ func (hm *SequencerHealthMonitor) loop() {
case <-ticker.C:
err := hm.healthCheck()
hm.metrics.RecordHealthCheck(err == nil, err)
hm.healthUpdateCh <- err
// Ensure that we exit cleanly if told to shutdown while still waiting to publish the health update
select {
case hm.healthUpdateCh <- err:
continue
case <-hm.done:
return
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion op-e2e/sequencer_failover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ func TestSequencerFailover_ConductorRPC(t *testing.T) {
// [Category: Sequencer Failover]
// Test that the sequencer can successfully failover to a new sequencer once the active sequencer goes down.
func TestSequencerFailover_ActiveSequencerDown(t *testing.T) {
t.Skip("Triggers a deadlock in shutdown")
sys, conductors, cleanup := setupSequencerFailoverTest(t)
defer cleanup()

Expand Down

0 comments on commit e19b3ca

Please sign in to comment.