locked
AlwaysOn AG - Synchronous-commit mode recovering from session timeout RRS feed

  • Question

  • I'd appreciate a bit of clarification please.  We're going to implement AG in synchronous-commit mode, and upon reading the following TechNet Article there's a note that says:

    If a synchronous-commit secondary replica times out without confirming that it has hardened the log, the primary marks that secondary replica as failed. The connected state of the secondary replica changes to DISCONNECTED, and the primary replica stops waiting for confirmation from the secondary replica. This behaviour ensures that a failed synchronous-commit secondary replica does not prevent hardening of the transaction log on the primary replica.

    All good so far.  Towards the beginning of the document there is a note that reads:

    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.

    So my question is, if a secondary replica changes to DISCONNECTED because the transaction was not hardened, is this the same as a session-timeout which the secondary replica can recover from by entering asynchronous-commit mode until it's caught up and then enters synchronous-commit again?

    Also, is there a point at which the DISCONNECTED state has existed for so long that synchronisation essentially fails and you would have to reinitialise (or is it a case that the DBAs need to pick up on this before the log file fills up on the primary replica)?

    Many thanks!

    Wednesday, October 15, 2014 2:32 PM

Answers

  • "So my question is, if a secondary replica changes to DISCONNECTED because the transaction was not hardened, is this the same as a session-timeout which the secondary replica can recover from by entering asynchronous-commit mode until it's caught up and then enters synchronous-commit again?"

    Yes


    "Also, is there a point at which the DISCONNECTED state has existed for so long that synchronisation essentially fails and you would have to reinitialise (or is it a case that the DBAs need to pick up on this before the log file fills up on the primary replica)?"
    It need to ne monitored.
    http://www.mssqltips.com/sqlservertip/2573/monitor-sql-server-alwayson-availability-groups/


    • Marked as answer by SQLPhil Wednesday, October 22, 2014 11:47 AM
    Friday, October 17, 2014 8:15 AM