Account for possibility of cache flush in load() (#15454)

* Account for possibility of cache flush in load()

* More cleaning

* More cleaning

* Remove unused method and some comment cleaning

* Fix typo

* Make the detected impossible purge race panic()!

* Finally revert to original .expect()

* Fix typos...

* Add assertion for max_root for easier reasoning

* Reframe races with LoadHint as possible opt.

* Fix test

* Make race bug tests run longer for less flaky

* Delay the clone-in-lock slow path even for RPC

* Make get_account panic-free & add its onchain ver.

* Fix rebase conflicts...

* Clean up

* Clean up comment

* Revert fn name change

* Fix flaky test...

* fmt...

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
carllin
2021-04-16 08:23:32 -07:00
committed by GitHub
parent 6dab20812e
commit d747614b27
9 changed files with 1109 additions and 266 deletions

View File

@@ -236,7 +236,7 @@ fn bench_concurrent_read_write(bencher: &mut Bencher) {
let i = rng.gen_range(0, pubkeys.len());
test::black_box(
accounts
.load_slow(&Ancestors::default(), &pubkeys[i])
.load_without_fixed_root(&Ancestors::new(), &pubkeys[i])
.unwrap(),
);
}