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

store: add path field to StoreConfig #6938

Merged
merged 7 commits into from Jun 3, 2022
Merged

store: add path field to StoreConfig #6938

merged 7 commits into from Jun 3, 2022

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Jun 1, 2022

Add path field to StoreConfig which makes it possible to configure
where RocksDB is located rather than hard-coding the location to
data subdirectory. The directory can be set under store.path JSON
path in config.json file, e.g.:

/* config.json */
{
  "genesis_file": "genesis.json",
  …
  "store": {
    "path": "/srv/near-hot-data",
    …
  },
  …
}

This helps with setup where neard home directory and the storage live
on separate file systems. Previously such configurations required
using of symbolic links or mounting storage inside neard home. Both
of those solutions weren’t as clean as ability to point neard directly
at the right place.

This will become even more useful with planned cold storage which will
call for all archival nodes to use multiple disks for the data (SSD
for head data and HDD for archival data).

Fixes: #6857

Add `path` field to StoreConfig which makes it possible to configure
where RocksDB is located rather than hard-coding the location to
`data` subdirectory.

This helps with setup where neard home directory and the storage live
on separate file systems.  Previously such configurations required
using of symbolic links or mounting storage inside neard home.  Both
of those solutions weren’t as clean as ability to point neard directly
at the right place.

This will become even more useful with planned cold storage which will
call for all archival nodes to use multiple disks for the data (SSD
for head data and HDD for archival data).

Fixes: near#6857
@mina86 mina86 requested a review from a team as a code owner June 1, 2022 17:43
@mina86 mina86 requested a review from mzhangmzz June 1, 2022 17:43
core/store/src/config.rs Outdated Show resolved Hide resolved
nearcore/src/lib.rs Outdated Show resolved Hide resolved
@mina86 mina86 removed the S-automerge label Jun 2, 2022
@near-bulldozer near-bulldozer bot merged commit 46401b7 into near:master Jun 3, 2022
@mina86 mina86 deleted the t branch June 3, 2022 17:20
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.

Take storage configuration into consideration when opening storage
2 participants