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

disk index: refactor OccupiedEnumTag #31028

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

jeffwashington
Copy link
Contributor

Problem

See #30711
enum tag is stored separately from enum values in the disk index.

Summary of Changes

Create an enum of the values themselves for safety, clarity, and easier refactoring.

Fixes #

Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

Nice! I almost requested this idea on the original PR; thanks for doing it!

@@ -286,7 +301,7 @@ impl<T: Copy> IndexEntryPlaceInBucket<T> {
index_entry.packed_ref_count.ref_count()
}

pub fn read_value<'a>(
pub(crate) fn read_value<'a>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this change snuck into this PR accidentally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no I Just left it here because it is a generally good thing.

@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #31028 (460f5e4) into master (9219a16) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #31028   +/-   ##
=======================================
  Coverage    81.5%    81.5%           
=======================================
  Files         728      728           
  Lines      205532   205536    +4     
=======================================
+ Hits       167629   167648   +19     
+ Misses      37903    37888   -15     

@jeffwashington jeffwashington merged commit 05f2a01 into solana-labs:master Apr 3, 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