Resolve intermittent test failure in test_store_scan_consistency_root#8486
Conversation
6fb9065 to
8836e7f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8486 +/- ##
========================================
Coverage 83.2% 83.2%
========================================
Files 846 846
Lines 369251 369259 +8
========================================
+ Hits 307229 307342 +113
+ Misses 62022 61917 -105 🚀 New features to boost your workflow:
|
brooksprumo
left a comment
There was a problem hiding this comment.
Code looks correct. I think it'll be valuable to look back and figure out why this was None originally.
| pruned_banks_request_handler.handle_request(¤t_bank); | ||
| } | ||
| }, | ||
| None, |
There was a problem hiding this comment.
Why was this None originally though?
There was a problem hiding this comment.
I spent some time on that. All the tests were originally None, but unrooted_slot was updated a long time ago during a refactor: solana-labs#17319
I checked out that changeset and got it to build. test_store_scan_consistency_root was passing at that time even with the added delay. Sometime between then and now something changed.
Problem
There's a race condition between bank drop and process_dead_slots.
With a sleep added to make the issue more likely, this test fails every time.
purge_slot_storage fails because
During normal operation this isn't an issue as the AccountsBackgroundService handles all Bank Drops, which is done in the same thread as remove_dead_slots_metadata.
Summary of Changes
Fixes #