1

I am trying to understand the behavior of failover groups for Azure SQL. It feels like I am missing something obvious.

Imagine the following scenario:

  1. I have a database with a configured failover group in RegionA and RegionB. RegionA is primary
  2. I insert row1, update row2 and delete row3 in a table in RegionA
  3. An outage occurs in RegionA and I end up with table changes above not being replicated to RegionB
  4. I do a manual, forced failover to RegionB and continue to operate for some time
  5. RegionA comes back online and the storage in region A is still intact

What happens with row1, row2 and row3 mentioned p.2?

What happens if row2 has been updated while operating in RegionB and now we have 2 conflicting changes?

adlanelm
  • 31
  • 2

1 Answers1

1

In a synchronous failover group, changes to the primary are not written to disk until they have been successfully replicated to all secondaries.

In your scenario, the changes would not have been committed in Region A once it was restored, and so there would be no discrepancy.

Anthony Norwood
  • 357
  • 1
  • 7
  • Thank you for the response Anthony. As far as I know [Auto-failover groups](https://learn.microsoft.com/en-us/azure/azure-sql/database/auto-failover-group-sql-db?tabs=azure-powershell) use asynchronous replication only. Also, p.2. in the scenario above implies that changes have been committed in RegionA, but not replicated yet. – adlanelm Mar 09 '22 at 20:20