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
cache executors on failed transactions #22308
cache executors on failed transactions #22308
Conversation
04601e0
to
5a4ec28
Compare
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.
Nice! r+ ci
5a4ec28
to
b289de2
Compare
Codecov Report
@@ Coverage Diff @@
## master #22308 +/- ##
=========================================
- Coverage 81.1% 81.0% -0.1%
=========================================
Files 523 551 +28
Lines 146793 149616 +2823
=========================================
+ Hits 119067 121302 +2235
- Misses 27726 28314 +588 |
b289de2
to
d4a0097
Compare
@jstarry Check this out, this is in response to your comment: #22313 (comment) |
d4a0097
to
e84bf10
Compare
pub fn miss(&mut self) { | ||
self.is_miss = true; | ||
} |
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.
This method is kinda dangerous because it could be used to make an "updated executor" into a cache miss and cause it to be considered dirty even when updates are not included. Can you add a #[cfg(test)]
or rename to set_miss_for_tests
or something?
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.
I tried adding #[cfg(test)]
but that didn't work, maybe that only works locally. I can rename to for_tests
Besides my above comment, looks great! Nice cleanup |
Added the |
figured it would have to be manually backported to v1.8 |
e84bf10
to
24bbea5
Compare
(cherry picked from commit 12e1602) # Conflicts: # program-runtime/src/invoke_context.rs # programs/bpf_loader/src/lib.rs # runtime/src/bank.rs
(cherry picked from commit 12e1602) # Conflicts: # program-runtime/src/invoke_context.rs # runtime/src/bank.rs
Problem
Verified and compiled executors of failed transactions are not cached, causing bursts of failed transactions to continually verify and recompile programs which have an impact on performance
Summary of Changes
Always cached executors whether or not the transaction fails.
Fixes #