You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Below is simplified description of how update is performed by the engine.
At first, update must read the record.
If record have backversion and backversion is ready to be garbage collected it must be erased.
Let primary page number is A and backversion page number is B.
Deletion of backversion creates dependency in precedence graph : A -> B, i.e. page A must be written after page B (as we just cleared backpointer at primary record version).
Then update must create and store new backversion. With high probablity it will be stored again on page B.
This create second dependency B -> A.
To prevent circle in precedence graph such case requires to write page A on disk clearing its dependencies.
This is so-called precedence write.
So, in the worst case we will write pages on disk for every updated record which make mass update performance terrible slow.
The likely issue happens if when engine performs update_in_place (for example second update of the same record in the same transaction).
The offered solition is to search for page B in precedence graph before storing backversion and choose another page to not create circle in precedence graph and avoid precedence write.
Submitted by: @hvlad
Below is simplified description of how update is performed by the engine.
At first, update must read the record.
If record have backversion and backversion is ready to be garbage collected it must be erased.
Let primary page number is A and backversion page number is B.
Deletion of backversion creates dependency in precedence graph : A -> B, i.e. page A must be written after page B (as we just cleared backpointer at primary record version).
Then update must create and store new backversion. With high probablity it will be stored again on page B.
This create second dependency B -> A.
To prevent circle in precedence graph such case requires to write page A on disk clearing its dependencies.
This is so-called precedence write.
So, in the worst case we will write pages on disk for every updated record which make mass update performance terrible slow.
The likely issue happens if when engine performs update_in_place (for example second update of the same record in the same transaction).
Commits: 789b069
The text was updated successfully, but these errors were encountered: