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

Concurrent sessions may lead DB using wrong 'head' on start-up #114

Closed
tzaeschke opened this issue Jan 6, 2020 · 0 comments
Closed

Concurrent sessions may lead DB using wrong 'head' on start-up #114

tzaeschke opened this issue Jan 6, 2020 · 0 comments
Assignees
Milestone

Comments

@tzaeschke
Copy link
Owner

@tzaeschke tzaeschke commented Jan 6, 2020

The DB currently uses two 'heads' (main pages). After each commit, one of these becomes alternatingly the latest 'head'.
During start-up the DB uses the TX-ID of these pages to find out which one is the latest head.

This is wrong, because in concurrent use transactions may not commit in the order they are opened, so the latest committed TX-ID may not have the highest ID. This can lead to the DB picking the wrong head on start-up.

Impact: Definitely lost data (all of the latest TX) + the picked 'head' may represent a broken (unreadable) database.

This issue requires a database format change.

@tzaeschke tzaeschke self-assigned this Jan 6, 2020
tzaeschke added a commit that referenced this issue Jan 6, 2020
tzaeschke added a commit that referenced this issue Jan 20, 2020
tzaeschke added a commit that referenced this issue Jan 28, 2020
tzaeschke added a commit that referenced this issue Feb 1, 2020
tzaeschke added a commit that referenced this issue Feb 1, 2020
@tzaeschke tzaeschke added this to the 0.5.3 milestone Feb 1, 2020
@tzaeschke tzaeschke closed this Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.