Increase performance of backout of dead record version (or undo of just created primary record version) when backversions chain is too long [CORE4935] #5226
Labels
affect-version: 2.1.5 Update 1
affect-version: 2.1.6
affect-version: 2.1.7
affect-version: 2.5.0
affect-version: 2.5.1
affect-version: 2.5.2 Update 1
affect-version: 2.5.2
affect-version: 2.5.3 Update 1
affect-version: 2.5.3
affect-version: 2.5.4
affect-version: 3.0 Alpha 1
affect-version: 3.0 Alpha 2
affect-version: 3.0 Beta 1
affect-version: 3.0 Beta 2
component: engine
fix-version: 3.0 RC1
priority: major
qa: cannot be tested
type: improvement
Submitted by: @hvlad
Function list_staying() used in backout and undo processes have complexity O(N^2), where N is the number of back versions.
There is a way to reduce complexity down to O(N) in most cases. Specifically - when current transaction (which does backout
or undo) already own the record (i.e. primary record version is marked by current transaction) there is guarantee that no other
transaction will try to backout\undo the record.
Another improvement is to cut and cleanup tail of the back-versions chain at point where it is legal
Commits: f7e248c FirebirdSQL/fbt-repository@886459f
The text was updated successfully, but these errors were encountered: