-
Notifications
You must be signed in to change notification settings - Fork 291
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
Move ideal_storage_size calculation before it is used #3250
Conversation
) -> AncientSlotInfos { | ||
let mut ancient_slot_infos = self.calc_ancient_slot_info(slots, tuning); | ||
// ideal storage size is total alive bytes of ancient storages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test for this, i.e. after we call collect_sort_filter_ancinet_slots() make sure that ideal_storage_size is updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good to me. Please re-request a review when PR is ready for review again/has the test. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
Thanks for adding the test.
* Move ideal_storage_size calculation before it is used * Add test
Problem
The
ideal_storage_size
tuning parameter is incorrectly calculated after it needs to be used.Summary of Changes
Move the update of the
ideal_storage_size
tuning parameter to an earlier point in the control flow before it is used.Adjust tests.