Tupl icon indicating copy to clipboard operation
Tupl copied to clipboard

Don't dirty leaf node when splitting on an edge

Open broneill opened this issue 6 years ago • 1 comments

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 avatar Jan 03 '19 03:01 broneill

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.

broneill avatar Feb 02 '19 17:02 broneill