The organization has an Always On availability group technology in place, and we have an open transaction on the primary server, but the secondary server accidentally transfers it to the secondary server. If the secondary server goes down, what happens to the stats log file on the primary server?

Note: Server Replica Node 2 Set Synchronous-commit mode.

enter image description here

1 Answer 1


From the docs:

If primary's session-timeout period is exceeded by a secondary replica, the primary replica temporarily shifts into asynchronous-commit mode for that secondary replica. When the secondary replica reconnects with the primary replica, they resume synchronous-commit mode.

Differences between availability modes for an Always On availability group

So after the timeout, the failed replica is switched to asynchronous mode, and the primary commits the transaction. The failed replica will eventually reconnect and receive the log record indicating that it should commit the transaction too, followed by all the log records while it was down. After it's caught up, it will switch back to synchronous-commit.

See eg Synchronous Always On Availability Groups Is Not Zero Data Loss

You can opt for having the primary fail to commit by setting REQUIRED_SYNCHRONIZED_SECONDARIES_TO_COMMIT on the AG.

  • thanks for your response. But my question is, when the secondary replica is down, the log of the Primary server will not grow? We assume that there are no other replicas! @David Browne Commented Jan 6, 2023 at 8:36
  • 1
    Yes. The log grows as long while the replica is offline. Commented Jan 6, 2023 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.