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

feat: flesh out overlay update/commit functions #687

Open
wants to merge 1 commit into
base: rh-split-rollback-delta-creation-commit
Choose a base branch
from

Conversation

rphmeier
Copy link
Contributor

I don't love the amount of cloning we do, but we can optimize that later.

Copy link
Contributor Author

rphmeier commented Jan 14, 2025

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.

@rphmeier rphmeier force-pushed the rh-split-rollback-delta-creation-commit branch from b43ea0b to 584754a Compare January 14, 2025 20:47
@rphmeier rphmeier force-pushed the rh-overlay-api-finished branch from 7ea7225 to d455b28 Compare January 14, 2025 20:47
Copy link
Contributor

@gabriele-0201 gabriele-0201 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One option to remove the clones (I think you are referring to extract everything from the overlay to later commit it), could be to switch from HashMap to BTreeMap within overlay::Data and then once its time to commit just move out pages and values from Data and a static iterator should be available!

// Pages must store their ID before being written out. Set it here.
updated_page.page.set_page_id(&updated_page.page_id);
for (page_id, (page, page_diff)) in updated_pages {
// TODO: make sure to set page ID slot in page somewhere else.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this vestigial? because UpdatedPages::into_frozen_iter seems to do this!

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.

2 participants