Repository navigation
Clarify which session-timeout value applies to a synchronous replica - #10428
Rudi Bruchez (rudi-bruchez) wants to merge 1 commit into
Conversation
|
Learn Build status updates of commit 7733f71: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Thank you for your contribution. Would you take a moment to sign the Contributor License Agreement (CLA)? After the CLA is signed, someone can review your pull request. Thanks! |
|
#label:"aq-pr-triaged" |
|
@microsoft-github-policy-service agree |
|
Rudi Bruchez (@rudi-bruchez) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. Randolph West MSFT (@rwestMSFT) |
|
Masha Thomas (MSFT) (@MashaMSFT) Can you review the proposed changes? Important: When the changes are ready for publication, adding a |
What's wrong
availability-modes-always-on-availability-groups.mdsays the primary waits for a synchronous secondary "unless the secondary replica fails to ping the primary replica within the primary's session-timeout period", and the note below repeats "the primary replica's session-timeout period". When the two replicas have differentSESSION_TIMEOUTvalues, the commit waits for the longer of the two, not for the primary's value.sys-availability-replicas-transact-sql.mdsays that on a failed connection the primary considers the secondaryNOT_SYNCHRONIZED.NOT_SYNCHRONIZEDisn't a state value; the synchronization state thatsys.dm_hadr_database_replica_states.synchronization_state_descshows for the secondary databases isNOT SYNCHRONIZING, as the availability modes page already says.Evidence
SQL Server 2019 CU32-GDR (15.0.4480.2), 2022 CU26 (16.0.4265.3) and 2025 CU9-GDR (17.0.5015.4), Developer, Linux containers. Two-replica availability group,
CLUSTER_TYPE = NONE, both replicasSYNCHRONOUS_COMMIT,FAILOVER_MODE = MANUAL, a fresh database with one table. A loop on the primary inserts one row every 200 ms and records eachINSERTduration. The secondary is frozen withpodman pause(processes stopped, TCP connections kept open). One run withpodman killinstead (2025, 10 / 10) waited 9,838 ms.Longest
INSERTwait after freezing the secondary:SESSION_TIMEOUTSame test on Windows: SQL Server 2025 CU9-GDR (17.0.5015.4), Enterprise Developer, Windows Server 2019, two-node WSFC, a dedicated availability group (
CLUSTER_TYPE = WSFC, both replicasSYNCHRONOUS_COMMIT,FAILOVER_MODE = MANUAL) with a fresh database. The secondary'ssqlservr.exeis frozen withNtSuspendProcess(the node and its cluster service keep running), one run per setting:SESSION_TIMEOUTINSERTwaitNot measured on Pacemaker.
After the timeout (2025, Linux and Windows),
synchronization_state_descfor the secondary database isNOT SYNCHRONIZINGandconnected_state_descisDISCONNECTED.Observed: the wait matches the longer of the two values, on Linux without a cluster and on Windows with WSFC. Expected per the current text: the primary's value (5 s in the 5 / 20 case).
Change
Removes "primary's" from the two places that name the period, states once, in the paragraph, that the longer of the two values applies, points the note's default value to the session-timeout section of the overview, and describes the failed connection in
sys.availability_replicaswith the database synchronization state the DMV shows.