Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix assert #31012

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions runtime/src/in_mem_accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1093,10 +1093,8 @@ impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> InMemAccountsIndex<T,
/// These were collected for this bin when we did batch inserts in the bg flush threads.
/// Insert these into the in-mem index, then return the duplicate (Slot, Pubkey)
pub(crate) fn populate_and_retrieve_duplicate_keys_from_startup(&self) -> Vec<(Slot, Pubkey)> {
let inserts = self.startup_info.insert.lock().unwrap();
// in order to return accurate and complete duplicates, we must have nothing left remaining to insert
assert!(inserts.is_empty());
drop(inserts);
assert!(self.startup_info.insert.lock().unwrap().is_empty());

let mut duplicate_items = self.startup_info.duplicates.lock().unwrap();
let duplicates = std::mem::take(&mut duplicate_items.duplicates);
Expand Down