Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce precedence writes [CORE2672] #3075

Closed
firebird-automations opened this issue Oct 9, 2009 · 6 comments
Closed

Reduce precedence writes [CORE2672] #3075

firebird-automations opened this issue Oct 9, 2009 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

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.

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC1 [ 10362 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants