APPEND_ONLY_STORAGE_INSERT_POINT

(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 latch is used to synchronize creation of new pages in an append-only storage unit in the version store, and must be acquired in EX mode.

(Books Online description: “Used to synchronize inserts in fast append-only storage units.”)

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

Added in SQL Server version:

pre-2005/2005

Removed in SQL Server version:

N/A

Extended Events latch_class value:

The map_key value in sys.dm_xe_map_values is 21 in 2008 and 2008 R2, and 16 in 2012 and 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 contention on this latch is excessive, you may need to disable snapshot isolation in one or more of the databases where it is enabled. It is also possible to see SLEEP_TASK waits if the buffer pool has a free page list stall (i.e. no available buffers) because of the volume of new pages being added to the version store.

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

  1. Inserting a version into the version store while updating a column in a table row

And many more similar stacks when versioning is enabled in either of its forms.

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

  1. LatchBase::Suspend+0x633
    LatchBase::AcquireInternal+0x415
    AppendOnlyVerStoreMgr::AddRecord+0xd7e
    VersionMgr::GenerateVersion+0x6b3
    IndexPageRef::Modify+0x1293
    BTreeRow::UpdateRecord+0x20ab
    IndexDataSetSession::SetDataInternal+0x9a46
    DatasetSession::SetData+0x16d
    RowsetNewSS::SetData+0x6a
    CValRow::SetDataX+0x63
    CEsExec::GeneralEval4+0xe7
    CQScanSimpleUpdateNew::GetRow+0x16b
    CQueryScan::GetRow+0x81
    CXStmtQuery::ErsqExecuteQuery+0x3dd
    CXStmtDML::XretDMLExecute+0x31c
    CXStmtDML::XretExecute+0xad
    CMsqlExecContext::ExecuteStmts<1,1>+0x427
    CMsqlExecContext::FExecute+0xa53
    CSQLSource::Execute+0x86c
    ExecuteSql+0x9a3