Description
ZkController.publishAndWaitForDownStates keeps looping over all collections in the cluster state to ensure that every replica hosted on the current node has been marked as down. This is wasteful when you have a large number of collections because each access to a non-watched collection gets data from ZK. Instead, we can watch the interesting collections (i.e. which have replicas hosted locally) and wait till we see the required state.