Dan Pahnke · Mar 31, 2020

Force a failover on a mirror?

Is there a way to force a failover from the primary mirror member to the backup member without forcing down the primary (which happens with ##class(SYS.Mirror).BecomePrimary())? What I'm trying to simulate is a network isolated condition on the primary.

4 0 6 195


Hello Dan,

I am struggling to understand the scenario that you are testing/planning for. Do you have an arbiter? I would read through the mirroring docs which discuss the various options available to you and the various automatic responses that mirroring can take (including some diagrams).

If you want to simulate network isolation, I think you'd need to actually network isolate. If you force the backup to become primary, Caché will try to force down the original primary to prevent split brain.

Thanks Vic,

What I was looking for was a way to, in effect, swap which member was primary and which was backup. Taking your advice and re-reading the Automatic Failover Mechanics section of the docs I've decided that there is no need for my test.

Thanks again.


Happy to help! For what it's worth, best practice to initiate a failover would be to simply cleanly shut down the primary.

Also when we are testing our scenarios we do phisically sometimes execute the network isolation amongst other tests

That routine ultimately uses the same API under the covers: ##class(SYS.Mirror).BecomePrimary(), which forces down the original primary.