-
Notifications
You must be signed in to change notification settings - Fork 168
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
Scheduler: Improve TTL #3161
base: master
Are you sure you want to change the base?
Scheduler: Improve TTL #3161
Conversation
@@ -81,12 +81,14 @@ impl Accounts { | |||
} | |||
} | |||
|
|||
/// Return loaded addresses and the deactivation slot. | |||
/// If no tables are de-activating, the deactivation slot is `u64::MAX`. |
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.
nit: this function only looks up addresses for one ALT
/// If no tables are de-activating, the deactivation slot is `u64::MAX`. | |
/// If the table hasn't been deactivated, the deactivation slot is `u64::MAX`. |
deactivation_slot: Slot, | ||
current_slot: Slot, | ||
) -> MaxAge { | ||
let alt_min_expire_slot = estimate_last_valid_slot(deactivation_slot.min(current_slot)); |
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.
Technically this should be current_slot + 1
I think because we know that the ALT didn't get deactivated in the current_slot
} | ||
} | ||
|
||
impl Bank { | ||
/// Load addresses from an iterator of `SVMMessageAddressTableLookup`. | ||
/// Load addresses from an iterator of `SVMMessageAddressTableLookup`, | ||
/// additionally returning the deactivation slot |
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.
/// additionally returning the deactivation slot | |
/// additionally returning the minimum deactivation slot across all referenced ALTs |
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.
looks good to me, definitely not great that we were reloading ALTs after just doing that work in the scheduler.. can we backport this to v2.0?
Problem
Summary of Changes
Fixes #