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] Allow AccountsFile::new_from_file to open a TieredStorage file #35071

Closed
wants to merge 5 commits into from

Conversation

yhchiang-sol
Copy link
Contributor

@yhchiang-sol yhchiang-sol commented Feb 4, 2024

Problem

AccountsFile::new_from_file() currently always assumes it is
an AppendVec file without any format check.

Summary of Changes

This PR makes AccountsFile able to first detect the file type.
It first opens as a TieredStorage file, which first checks whether
the tailing magic-number matches. When the MagicNumber
mismatch, it will open as an AppendVec. Otherwise, it will
proceed by opening it as a tiered-storage file.

Dependency

#35049
#35063
#35065
#35066

@yhchiang-sol yhchiang-sol marked this pull request as draft February 4, 2024 07:01
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.

1 participant