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

Snapshots - validate that the snapshot is on the same file system #10307

Open
VanBarbascu opened this issue Dec 6, 2023 · 0 comments
Open

Snapshots - validate that the snapshot is on the same file system #10307

VanBarbascu opened this issue Dec 6, 2023 · 0 comments
Labels
C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on. Near Core Node Node team

Comments

@VanBarbascu
Copy link
Contributor

Context

Snapshots are taken at the epoch boundary to facilitate resharding and state parts generation for state sync.
A snapshot is taken using RocksDB builtin functionality. In the background, it creates hard links to the db at the moment of snapshot.

Problem

The hard links are created as an optimization if the snapshot folder is on the same file system. If the destination is on a different fs, the snapshot will copy the entire db. This operation is not instant and will stall the functionality of the node.

Code pointers

StateSnapshotConfig
get_state_snapshot_base_dir is where we compose the path.

Test steps

  • setup a node with neard init
  • setup config.json to enable snapshots every epoch.
  • run the node and check if the snapshots are taken.
  • stop the node
  • mount another fs in the folder where the snapshots are taken
  • run the node and check if it detects that the snapshot path is on another FS.
@VanBarbascu VanBarbascu added C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on. Near Core Node Node team labels Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on. Near Core Node Node team
Projects
None yet
Development

No branches or pull requests

1 participant