Topology change detector, when detecting that target bucket no long exists, would delete replication spec right away. This could cause replication spec to be incorrectly deleted in the case where a target node is being failed over and has stopped serving the bucket.
One way to fix this is not have Topology change detector delete repl spec in this scenario, and instead defer repl spec deletion to replication spec validation. Repl spec validation would delete repl spec only when target bucket cannot be found in four consecutive checks, which most likely is performed on different target nodes. This mechanism is much less error prone to false positives.