Fix parent record locks usage in child banks (#4159)

* Introduce record locks on txs that will be recorded

* Add tests for LockedAccountsResults

* Fix broken bench

* Exit process_entries on detecting conflicting locks within same entry
This commit is contained in:
carllin
2019-05-07 15:51:35 -07:00
committed by GitHub
parent 55e3b7d380
commit 69eeb7cf08
6 changed files with 361 additions and 113 deletions

View File

@ -99,6 +99,9 @@ fn append_vec_concurrent_read_append(bencher: &mut Bencher) {
let indexes1 = indexes.clone();
spawn(move || loop {
let len = indexes1.lock().unwrap().len();
if len == 0 {
continue;
}
let random_index: usize = thread_rng().gen_range(0, len + 1);
let (sample, pos) = indexes1
.lock()