sieve-project / sieve

Automatic Reliability Testing for Kubernetes Controllers and Operators
BSD 2-Clause "Simplified" License
327 stars 20 forks source link

Fix dead lock issue caused by blocking informer and refine obs-gap server implementation #27

Closed marshtompsxd closed 3 years ago

marshtompsxd commented 3 years ago

Instead of blocking the whole reconcile, we should block after the reconciler calling informer.HasSynced and before reading the reconciler. This will avoid the deadlock issue as the reconciler will not wait for any lock when the informer is also blocked. Besides we use only one lock to coordinate between the informer and the reconciler: