postgres-operator/pkg
Oleksii Kliukin e90a01050c
Switchover must wait for the inner goroutine before it returns. (#343)
* Switchover must wait for the inner goroutine before it returns.

Otherwise, two corner cases may happen:

 - waitForPodLabel writes to the podLabelErr channel that has been
   already closed by the outer routine

 - the outer routine exists and the caller subscribes to the pod
   the inner goroutine has already subscribed to, resulting in panic.

 The previous commit fe47f9ebea
 that touched that code added the cancellation channel, but didn't bother
 to actually wait for the goroutine to be cancelled.

 Per report and review from @valer-cara.
 Original issue: https://github.com/zalando-incubator/postgres-operator/issues/342
2018-07-16 11:50:35 +02:00
..
apiserver Merge pull request #240 from zalando-incubator/feature/goreport-improvements 2018-02-22 11:31:08 +01:00
cluster Switchover must wait for the inner goroutine before it returns. (#343) 2018-07-16 11:50:35 +02:00
controller Avoid possible skipping SYNC events. 2018-05-31 18:29:15 +02:00
spec Support for per-cluster and operator global sidecars (#331) 2018-07-02 16:25:27 +02:00
util Support for per-cluster and operator global sidecars (#331) 2018-07-02 16:25:27 +02:00