-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Return implicit delay visibility tombstone #31493
Conversation
Codecov Report
@@ Coverage Diff @@
## master #31493 +/- ##
=======================================
Coverage 81.4% 81.4%
=======================================
Files 731 731
Lines 208720 208738 +18
=======================================
+ Hits 169980 170006 +26
+ Misses 38740 38732 -8 |
@@ -425,6 +425,15 @@ impl LoadedPrograms { | |||
|
|||
if current_slot >= entry.effective_slot { | |||
return Some((key, entry.clone())); | |||
} else { |
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.
Wouldn't this condition also trigger when recompilation for feature set changes happens?
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.
That's correct. One potential solution is to define a const for the gap between deployed and effective slots for the delay visible programs. e.g. 1 slot. We can return the tombstone only if the gap is 1 slot, and the current slot >= deployment slot but < effective slot.
This 1 slot gap will be much less compared to the slot offset during recompilation. So we should be able to differentiate between the two use-cases.
Any other solutions to handle this?
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.
Updated the code and the test.
Problem
The explicit placement of delay visibility tombstone has been removed from the code. Need to update
extract()
to implicitly return the tombstone under correct conditions.Summary of Changes
Return the delay visibility tombstone if the current slot is between deployment and effective slot for the cached program.
Updated the unit tests.
Fixes #