removing inner goroutine in cluster.Switchover (#1876)

* removing inner goroutine in cluster.Switchover and resolve race between processPodEvent and unregisterPodSubscriber
* unlock mutex after handling event, now with non-blocking default case
This commit is contained in:
Felix Kunde
2022-05-17 18:10:39 +02:00
committed by GitHub
parent c6f2c68588
commit 268a86a045
5 changed files with 36 additions and 44 deletions
+1 -1
View File
@@ -451,7 +451,7 @@ func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) {
panic("could not acquire initial list of clusters")
}
wg.Add(5)
wg.Add(5 + util.Bool2Int(c.opConfig.EnablePostgresTeamCRD))
go c.runPodInformer(stopCh, wg)
go c.runPostgresqlInformer(stopCh, wg)
go c.clusterResync(stopCh, wg)