-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add run parent directory for accounts files #29794
Add run parent directory for accounts files #29794
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor things. Last thing I think should be fixed is the inner result unwrapping @brooksprumo highlighted (I also commented)
4b7aa8a
to
d69b9b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Please re-request review once CI completes and I'll make a final pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
let deserialized_bank = snapshot_utils::bank_from_snapshot_archives( | ||
&[accounts_dir.path().to_path_buf()], | ||
&[accounts_dir.as_path().to_path_buf()], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this accounts_dir
could be used directly:
&[accounts_dir.as_path().to_path_buf()], | |
&[accounts_dir], |
To not block this PR, can you address this in a subsequent PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I will do this in a subsequent PR. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
.map(|temp_dir| { | ||
create_accounts_run_and_snapshot_dirs(temp_dir).map(|(run_dir, _snapshot_dir)| run_dir) | ||
}) | ||
.collect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I wasn't aware you could collect into a result like this! Neat!
@xiangzhu70 This is causing OOM on master. |
This PR is causing OOM on master. Reverting it for now. This reverts commit 74f89d1.
Problem
To allow hardlinking accounts files into snapshot directories (PR 29496), the first step is to generate run/ and snapshot directories for all the user provided account_paths.
This is a split of the PRs #29496 and #28745
Summary of Changes
Add the setup_accounts_run_and_snapshot_paths function;
Add the generate_test_tmp_account_path function to be used for the tests;
Many other small changes to call the setup function to initialize the account paths.
Fixes #