The assignMetaReplicas method works kinda like this:
Now this unassignExcessMetaReplica method is the one that gets rid of the replicas we no longer need. It closes them and deletes their zNode. Unfortunately this only happens if we decreased the replica number. If we disabled it, by setting the replica number to 1 assignMetaReplicas returns instantly without cleaning up the no longer needed replicas resulting in replicas lingering around.