This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Consistently create temp dirs under ledger/farf#10848
Merged
ryoqun merged 1 commit intosolana-labs:masterfrom Jul 1, 2020
Merged
Consistently create temp dirs under ledger/farf#10848ryoqun merged 1 commit intosolana-labs:masterfrom
ryoqun merged 1 commit intosolana-labs:masterfrom
Conversation
ryoqun
commented
Jun 30, 2020
| leader_node.info.rpc.port(), | ||
| leader_node.info.rpc_pubsub.port(), | ||
| )); | ||
| leader_config.account_paths = vec![leader_ledger_path.join("accounts")]; |
Contributor
Author
There was a problem hiding this comment.
Well, I wanted to fix this sneaky behavior as well... I don't think we should accept empty account_paths first of all... But I punted it...:
solana/runtime/src/accounts_db.rs
Lines 472 to 481 in 4b93a7c
Codecov Report
@@ Coverage Diff @@
## master #10848 +/- ##
=======================================
Coverage 81.8% 81.9%
=======================================
Files 303 303
Lines 71079 71084 +5
=======================================
+ Hits 58208 58228 +20
+ Misses 12871 12856 -15 |
carllin
approved these changes
Jul 1, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Sometimes temp dirs are created under
/tmp(the tempfile crate's default) or not. This is confusing:It took some time to notice
mount-inglocal-cluster/farfisn't enough while debugging: #10718 (comment)Also, when I was testing on cloud instances in the distant past, I was crippled by the use of
/tmpfor snapshot-handling, because/tmpwas on the system partition file system with little free space albeit plenty of capacity for the ledger dir.Also, when creating snapshots, using same temp dir with the
accountsdir may realize more cheaper file system move/copies.Also, using the system-wide /tmp for testing and running validator as a background hampers the general system performance (i.e. my local computer) and
CTRL-C-ing it pollutes/tmpfor unneeded reason too often even if I provision a special dirfarfon a different block device, ignoring system administrator's intention.....Summary of Changes
Consistently, create them under the
farfdir or the ledger dir. This PR doesn't fix all of uses in our codebase but still it should cover almost all relevant codepath.Part of #10718