SQL Server 2019 ADR : Logical revert

sakuraime 2,326 Reputation points
2021-07-29T02:52:11.107+00:00

There is a process call Logical Revert
118787-image.png

it says it's a async process, Suppose I am modifying a 10000Rows of a table , and these 10000Rows old version are copied to Version store . If I roll back the transaction , actually it's required to copy back the old version from version store to the original table , so how can it doing instantly ? During the roll back , the original records also need to be locked ? What actually mean an async process here ?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,800 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CathyJi-MSFT 22,201 Reputation points Microsoft Vendor
    2021-07-29T06:55:15.457+00:00

    Hi @sakuraime ,

    Logical revert is a row-level undo using the persisted version store. When a transaction aborts, the previous version is made available through a pointer as opposed to physically changing the in-row value. This allows all locks to release immediately instead of waiting for the change to complete. Put another way, if a transaction rolls back, logical revert allows a second transaction to use the persisted version store for the same row immediately, when it would otherwise be blocked waiting for the first transaction to finish rolling back.

    Quote from the blog Accelerated Database Recovery in SQL Server 2019.


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.