HADR_SYNC_COMMIT

(Republishing, or using this info in a commercial product/website, is prohibited without permission. All other uses are permitted. If in doubt, please ask.)

(Back to main page…)

Description:

This wait type is when a thread is waiting for the remote log block copy to a synchronous availability group replica as part of flushing a log block to disk on the primary replica. The local flush and the remote copy are initiated at the same time, and then the thread waits for the remote copy (incurring HADR_SYNC_COMMIT) and then waits on the local flush, if it hasn’t already completed (incurring WRITELOG). This is described in this CSS post. Note that this wait does NOT include replaying the transaction log on the replica.

(Books Online description: “Waiting for transaction commit processing for the synchronized secondary databases to harden the log. This wait is also reflected by the Transaction Delay performance counter. This wait type is expected for synchronized availability groups and indicates the time to send, write, and acknowledge log to the secondary databases.”)

Questions/comments on this wait type? Click here to send Paul an email, especially if you have any information to add to this topic.

Added in SQL Server version:

2012

Removed in SQL Server version:

N/A

Extended Events wait_type value:

The map_key value in sys.dm_xe_map_values is 776 in 2012 and 794  in 2014 RTM. After 2014 RTM, you must check the DMV to get the latest value as some map_key values have changed in later builds.

Other information:

If this wait type becomes prevalent, the bottleneck could be:

  1. The remote log block copy during a log block flush. Check for networking issues and performance issues on the synchronous replica, especially around the I/O performance of the replica’s log file.
  2. With a synchronous replica, the thread waiting to update the latest log-harden LSN on the primary replica (which will be waiting for HADR_LOGPROGRESS_SYNC). See that wait type for how to investigate.
There’s a little info on how the looping works inside the Engine for this wait in this blog post.

Known occurrences in SQL Server (list number matches call stack list):

  1. TBD

Abbreviated call stacks (list number matches known occurrences list):

  1. TBD