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

fix: first leaf mut have a separator of all 0 #682

Open
wants to merge 1 commit into
base: gm_fix_fill_and_empty
Choose a base branch
from

Conversation

gabriele-0201
Copy link
Contributor

@gabriele-0201 gabriele-0201 commented Jan 10, 2025

What this pr implements is a function to enforce that the separator of the first leaf in the beatree is all 0.

The reason for opting for a new function is to avoid adding complexity to the leaf_stage logic. Carrying around information about the first leaf would have required a lot of modifications here and there. Now, instead, that rule is enforced by only the new function and the unwrap_or within the LeafUpdater::separate function. Additionally, this edge case is very unlikely, and the function will, for the most part, return after the first check. The goal was to minimize the impact on the critical path and reduce code complexity while maintaining the rule's validity.

Closes THR-91

Copy link
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

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

Successfully merging this pull request may close these issues.

1 participant