microbean / microbean-kubernetes-controller

A toolset for writing Kubernetes controllers, or operators, in Java.
https://microbean.github.io/microbean-kubernetes-controller/
Apache License 2.0
20 stars 7 forks source link

Waiting to start the siphon until the synchronized property is true is mistaken #1

Closed ljnelson closed 6 years ago

ljnelson commented 6 years ago

See https://github.com/microbean/microbean-kubernetes-controller/blob/master/src/main/java/org/microbean/kubernetes/controller/Controller.java#L405

I think that's wrong.

Typically the cache is populated with, say, three synchronization events via the replace method. So now the cache is both populated and full. It would be wrong to block the consumer until the population count goes to zero (which is what happens, bizarrely, now).

I think "waiting for cache sync", as they say, means making sure that the event cache is drained to Somewhere Else™ whereupon it is now safe for that Somewhere Else™ to be processed. That's not reflected here.

ljnelson commented 6 years ago

Fixed