runtime: fix possible deadlock in in_mem_accounts_index (#26046)

This commit is contained in:
Boqin Qin(秦 伯钦) 2022-06-24 00:35:47 +08:00 committed by GitHub
parent 102fb98070
commit 355e09e1fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -147,6 +147,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
result.push((*k, Arc::clone(v)));
}
});
drop(map);
self.hold_range_in_memory(range, false);
Self::update_stat(&self.stats().items, 1);
Self::update_time_stat(&self.stats().items_us, m);