HADR_LOGPROGRESS_SYNC is contention on the structure that releases synchronous commits on an Availability Group primary. When it becomes prevalent, HADR_SYNC_COMMIT rises with it even though the network and secondary look fine. Run the check to rule out the send queue first, then look at the primary.Microsoft’s definition is short: a concurrency control wait when updating the log progress status of database replicas. That structure holds the latest log-harden LSN on a primary with a synchronous replica, and sessions waiting in HADR_SYNC_COMMIT are signalled that their commit has completed once that LSN passes theirs. Updating or reading it goes through this wait.
Is It a Problem?
Small amounts come with any synchronous AG. When it becomes prevalent, you will also see many HADR_SYNC_COMMIT waits, because committing transactions are slow to be told they are done. Get Wait Statistics does not filter it out, so if it ranks, you will see it. The tell is sync commit waits up while the send queue and the secondary look healthy.
The baseline to monitor is this wait’s share next to HADR_SYNC_COMMIT, read together with the send queue.
Common Causes
- Scheduler problems on the primary. A 2018 support post describes a thread going non-yielding on the same scheduler causing this pattern, fixed in SQL Server 2016 SP1 CU7.
- Very high commit concurrency on the primary.
- General CPU saturation slowing the commit signalling path.
The Check To Run
First rule out the pipeline: if the send queue is growing, the problem is downstream, not this wait.
SELECT
ar.replica_server_name,
DB_NAME(drs.database_id) AS database_name,
drs.synchronization_state_desc,
drs.log_send_queue_size,
drs.log_send_rate,
drs.redo_queue_size,
drs.redo_rate
FROM sys.dm_hadr_database_replica_states AS drs
JOIN sys.availability_replicas AS ar ON ar.replica_id = drs.replica_id
ORDER BY drs.log_send_queue_size DESC;
If the queues are clean but HADR_SYNC_COMMIT and this wait rise together, check scheduler health on the primary in sys.dm_os_schedulers and look for non-yielding scheduler messages in the error log during the episodes. The query needs VIEW SERVER STATE.
What To Do
- Check the build against known fixes for this pattern, starting with the one above.
- Resolve scheduler problems on the primary, such as non-yielding threads or CPU saturation.
- Re-measure
HADR_SYNC_COMMITalongside this wait after each change.
The HADR Commit and Flow Waits
These are the Availability Group waits on the path a commit takes from the primary to its secondaries: capturing log, sending it, waiting for it to harden, and the controls that throttle it. The main page is HADR_SYNC_COMMIT.
- HADR_SYNC_COMMITSynchronous commit. The primary waiting for a synchronous secondary to harden the log.The main page for this family
- HADR_DATABASE_FLOW_CONTROLFlow control. Sends paused because the queue of unacknowledged messages is full.Worth a look when it climbs
- HADR_GROUP_COMMITGroup commit. Commits held briefly so several fit into one log block; expected.Worth a look when it climbs
- HADR_LOGPROGRESS_SYNCLog progress. Concurrency control while updating each replica’s log progress.Worth a look when it climbs. This page.
- HADR_LOGCAPTURE_WAITLog capture. Waiting for log records to become available; expected when caught up.Usually noise
- PREEMPTIVE_HADR_LEASE_MECHANISMLease. The Availability Group lease manager scheduling.Worth investigating
- HADR_SEEDING_LIMIT_BACKUPSAutomatic seeding. Recorded during automatic seeding; reported as long and benign.Worth a look when it climbs
Where To Go Next
If HADR_LOGPROGRESS_SYNC is climbing with sync commit waits, these are the next places to look.
- The waits that usually matter, ranked, with what each one is telling you.
- HADR_SYNC_COMMIT, the Availability Group wait that costs users time.
- Check Always On Availability Group Latency, send and redo queues for each replica.
- High Availability, the scripts and guides for Availability Groups and replicas.
Leave a Reply