Force a failover on a mirror?

Primary tabs

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.

Replies

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).

https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GHA_mirror

https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GHA_mirror#GHA_mirror_set_autofail_outages

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.

Dan

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.