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

remove uid concept from disk buckets #30836

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

jeffwashington
Copy link
Contributor

Problem

See #30711

uid concept implies a per-element header of more than 1 bit. We're working towards only having a single bit to represent free/in-use.

Summary of Changes

Remove concept of uid stored per entry. The pubkey is already unique per entry and has to be compared anyway.

if elem.key == *key {

Fixes #

brooksprumo
brooksprumo previously approved these changes Mar 21, 2023
/// mark this entry as unlocked
fn unlock(&mut self, expected: Uid) {
Copy link
Contributor

@brooksprumo brooksprumo Mar 21, 2023

Choose a reason for hiding this comment

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

Removing the Uid param here is nice. Do you plan to also do that for try_lock()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I should have. done now.

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #30836 (330334c) into master (bc933c6) will increase coverage by 0.0%.
The diff coverage is 88.8%.

@@           Coverage Diff            @@
##           master   #30836    +/-   ##
========================================
  Coverage    81.4%    81.4%            
========================================
  Files         725      723     -2     
  Lines      203596   203281   -315     
========================================
- Hits       165833   165655   -178     
+ Misses      37763    37626   -137     

@jeffwashington jeffwashington merged commit 4285cb2 into solana-labs:master Mar 22, 2023
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