Skip to content
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

Fix race in remove_unrooted_race and flush_slot_cache #18785

Merged
merged 2 commits into from
Jul 22, 2021

Conversation

carllin
Copy link
Contributor

@carllin carllin commented Jul 21, 2021

Problem

test_cache_flush_remove_unrooted_race is flaky https://buildkite.com/solana-labs/solana/builds/50349#b8b9efb2-8ace-496e-b975-e40a2a2ca3f4, where this assertion fails:

assert!(self.accounts_cache.remove_slot(slot).is_some());
. This is because between these two checks,
self.accounts_cache.slot_cache(slot).and_then(|slot_cache| {
let is_being_purged = {
, remove_unrooted_slots() could have removed the slot from the cache

Summary of Changes

Fixup order of checking, introduce new test.

Fixes #

lijunwangs
lijunwangs previously approved these changes Jul 21, 2021
Copy link
Contributor

@lijunwangs lijunwangs left a 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

@mergify mergify bot dismissed lijunwangs’s stale review July 21, 2021 18:38

Pull request has been modified.

@carllin carllin force-pushed the FixAccountsDb branch 2 times, most recently from 8b0a193 to 066dc4d Compare July 21, 2021 22:33
@codecov
Copy link

codecov bot commented Jul 22, 2021

Codecov Report

Merging #18785 (133724f) into master (23d9fe5) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #18785   +/-   ##
=======================================
  Coverage    82.8%    82.8%           
=======================================
  Files         441      441           
  Lines      124988   125045   +57     
=======================================
+ Hits       103554   103614   +60     
+ Misses      21434    21431    -3     

@carllin carllin removed the v1.7 label Jul 22, 2021
@carllin carllin merged commit 5cabb5b into solana-labs:master Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants