Snapshots - validate that the snapshot is on the same file system #10307
Labels
C-good-first-issue
Category: issues that are self-contained and easy for newcomers to work on.
Near Core
Node
Node team
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
neard init
config.json
to enable snapshots every epoch.The text was updated successfully, but these errors were encountered: