PWAIT_HADR_WORKITEM_COMPLETED

(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:

Just as the Books Online description states.

(Books Online description: “Internal wait by a thread waiting for an async work task to complete. This is an expected wait and is for CSS use.”)

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:

Maps to the HADR_WORKITEM_COMPLETED map_value in sys.dm_xe_map_values (thanks to Jonathan’s post here).

The map_key value in sys.dm_xe_map_values is 763 in 2012 and 781 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:

Any time an asynchronous operation in an availability group is being waited for, this wait will occur. Examples of such operations are adding a database to an AG or dropping a database from an AG.

If this wait occurs for a long period of time, it is indicative of the operation stalling for some reason. I’ve heard of situations where removing a database from an AG hangs forever, with this wait type accumulating time on one thread. In such cases, a server reboot is required, and I would think that’s a SQL Server bug.

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

  1. TBD

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

  1. TBD