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

Don't dirty leaf node when splitting on an edge #109

Open
broneill opened this issue Jan 3, 2019 · 1 comment
Open

Don't dirty leaf node when splitting on an edge #109

broneill opened this issue Jan 3, 2019 · 1 comment

Comments

@broneill
Copy link
Member

broneill commented Jan 3, 2019

When inserting a new entry, the leaf node is always dirtied in advance. If the leaf needs to split, and it splits on an edge, then dirtying the node was unnecessary, and it causes an extra page to be written.

@broneill
Copy link
Member Author

broneill commented Feb 2, 2019

Implementing this is tricky, due to how root node splits are handled. When finishing a split, if the node is the root node or if it becomes the root node during latch re-acquisition, then the original node must be in a dirty state. This is because it will remain as the root, and so it gets promoted to become the parent node.

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

1 participant