GoogleCloudPlatform/kubernetes — pull request #2736 by erictune (2014-12-03 06:23:44+00:00)
Title: Fix race that drops the first event on restart.

RegisterHandlers was called after the listening for events had already begun.
So, there was a race where sometimes the first update would, with the
initial state, would notify an empty list of listeners.
This showed up in services.sh e2e test as empty service and endpoint maps
after the test step which restarts the kube-proxy.

Perhaps due to timing, this doesn't show up with etcd source, but does
show up with apiserver as a source. A separate PR makes APIserver
the source as a default, and depends on this.

This took me several days to debug.