fix incorrect inefficient vote worker#9786
Conversation
|
Put an actual description please |
|
cmon u gotta live a little we're building the future of finance |
f1b12fe to
8a0da75
Compare
Given the fix is a single commit, the PR that lands on master should be clean and meme free. So I think we can just send this? |
|
Add a test? |
what's that? |
| commit_transactions_result, | ||
| should_bank_still_be_processing_txs, | ||
| ) { | ||
| (Err(PohRecorderError::MaxHeightReached), _) | (_, false) => { |
There was a problem hiding this comment.
I feel it is easier to reason if change to (_, true). Something like this:
let reached_max_poh_height = match (
commit_transactions_result,
bank.is_complete(),
) {
(Err(PohRecorderError::MaxHeightReached), _) | (_, true) => {
true
}
_ => false,
Also, downstream seems to use function has_reached_end_of_slot() that repeats same logic again, checking bank.is_complete() at ln 419 seems be redundant.
There was a problem hiding this comment.
how about we merge this fix and get the insane perf win and then worry about refactoring out redundant stuff later
There was a problem hiding this comment.
Sounds reasonable. What do you think about instead of adding ! in front of bank.is_complete(), let's flip false at ln 424 to true to avoid negative of negative? (first part of original comment)
|
Explored testing this, was somewhat feasible if we isolate the process transactions function: OliverNChalk@bd9a71b @tao-stones any thoughts on testing? |
I was originally thinking to extract logic of determine |
|
sure push test |
OliverNChalk
left a comment
There was a problem hiding this comment.
Looks good but can we rebase to squash the merge, else the merge queue will generate a default commit from the PR name which wont be as clear as the commit message you previously wrote
60f9090 to
68eb87b
Compare
68eb87b to
5d1fbf4
Compare
|
alright gogogogo |
|
pls don't make me do anything else, im just here to fix bugs not fix your test suite coverage or satisfy your nits tyvm do any other thing in a cleanup/followup |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9786 +/- ##
=======================================
Coverage 82.7% 82.7%
=======================================
Files 901 901
Lines 324845 324866 +21
=======================================
+ Hits 268722 268777 +55
+ Misses 56123 56089 -34 🚀 New features to boost your workflow:
|
Problem
yes.
reached_end_of_slotis set to true after a single vote batch, which reinserts all unprocessed vote packets back into the vote storage.(git gud @apfitzge)
Summary of Changes
do not mark
reached_end_of_slotprematurely...