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

[TieredStorage] HotStorageReader::get_account_meta_from_offset() #33724

Merged

Conversation

yhchiang-sol
Copy link
Contributor

@yhchiang-sol yhchiang-sol commented Oct 17, 2023

Problem

HotStorageReader currently only implements get_footer(). It does not
have a function to obtain the account meta.

Summary of Changes

This PR implements HotStorageReader::get_account_meta_from_offset().
A function that returns the account meta located at the specified offset.
This will be the helper function that will be later used to obtain the account
meta when the offset is available from the index block of a hot storage file.

Test Plan

A new test is included in this PR.

@yhchiang-sol yhchiang-sol marked this pull request as draft October 17, 2023 05:23
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #33724 (bdea578) into master (e96678b) will increase coverage by 0.0%.
Report is 2 commits behind head on master.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #33724   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         806      806           
  Lines      217913   217945   +32     
=======================================
+ Hits       178286   178314   +28     
- Misses      39627    39631    +4     

@yhchiang-sol yhchiang-sol marked this pull request as ready for review October 17, 2023 16:51
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.

looks good; some nits

accounts-db/src/tiered_storage/hot.rs Outdated Show resolved Hide resolved
accounts-db/src/tiered_storage/hot.rs Outdated Show resolved Hide resolved
@yhchiang-sol
Copy link
Contributor Author

Will do a rebase once the PR gets approval.

brooksprumo
brooksprumo previously approved these changes Oct 18, 2023
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.

lgtm

@yhchiang-sol
Copy link
Contributor Author

Rebase & squash.

@yhchiang-sol yhchiang-sol merged commit 9427343 into solana-labs:master Oct 18, 2023
31 checks passed
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