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

Uses IntSet for uncleaned slots from visit_duplicate_pubkeys_during_startup() #34009

Conversation

brooksprumo
Copy link
Contributor

Problem

Similar to #34008, AccountsDb::visit_duplicate_pubkeys_during_startup() identifies uncleaned slots. It puts them in a HashSet. The slot itself is already a unique identifier, and furthermore, there won't be any collisions here. We also don't need cryptographic security for the HashSet. Instead, we can use an IntSet to skip hashing the slot.

Summary of Changes

Replace HashSet with IntSet.

@brooksprumo brooksprumo self-assigned this Nov 9, 2023
@brooksprumo brooksprumo marked this pull request as ready for review November 9, 2023 20:33
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #34009 (eafc21c) into master (bba6ea2) will decrease coverage by 0.1%.
Report is 5 commits behind head on master.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #34009     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         811      811             
  Lines      219347   219347             
=========================================
- Hits       179732   179697     -35     
- Misses      39615    39650     +35     

Copy link
Contributor

@jeffwashington jeffwashington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@brooksprumo brooksprumo merged commit 69ab8a8 into solana-labs:master Nov 10, 2023
17 checks passed
@brooksprumo brooksprumo deleted the generate-index/duplicate-pubkeys/intset branch November 10, 2023 16:29
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