You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When starting Lotus from snapshot its easy to forget to manually cleanup the .lotus/datastore folder before running the --import-snapshot command. This may result in issues/errors that are difficult to debug.
Proposal
We should check whether the .lotus/datastore folder exists when starting lotus --import-snapshot. If the folder exists, we should do one of:
Always exit Lotus with a non-zero exit code and error message that user needs to delete the .lotus/datastore and run the import again.
Always automatically cleanup the .lotus/datastore and continue the import.
Always ask user (Y/N) whether Lotus should cleanup the .lotus/datastore folder and then (if Y) continue the import, or (if N) exit Lotus with non-zero exit code. Also introduce a --force-import-cleanup flag that if set will automatically select Y so this could be run non-interactively from a script.
Discussion
a) Which (1,2,3) is the best
b) Its my understanding that .lotus/datastore is the only folder that needs to be deleted. However if we will be doing a cleanup of the .lotus/datastore should we also delete other folders like .lotus/sqlite although its not required .
c) For context, this task started from this slack thread.
The text was updated successfully, but these errors were encountered:
I think this can be closed now, as #11032 has been merged. The PR introduces a remove-existing-chain flag which can be used when importing a snapshot to clean up the existing chain data (both splitstore and non-splitstore node) before importing the snapshot. Like this:
I think that flag does not address the concern that I raised in 10875, unless we update all our docs to call out that users should always use this flag. But I think we should just make the remove-existing-chain be the default behavior when importing a snapshot and maybe add something like --preserve-existing-chain for those rare cases (if any) where someone wants to keep that data around
I think it would make sense to have a remove-existing-chain = true by default when importing from a snapshot, cuz folks who do so are mostly looking for a fresh chain state or a lighter weight node.
When starting Lotus from snapshot its easy to forget to manually cleanup the
.lotus/datastore
folder before running the--import-snapshot
command. This may result in issues/errors that are difficult to debug.Proposal
We should check whether the
.lotus/datastore
folder exists when starting lotus--import-snapshot
. If the folder exists, we should do one of:.lotus/datastore
and run the import again..lotus/datastore
and continue the import..lotus/datastore
folder and then (if Y) continue the import, or (if N) exit Lotus with non-zero exit code. Also introduce a--force-import-cleanup
flag that if set will automatically select Y so this could be run non-interactively from a script.Discussion
a) Which (1,2,3) is the best
b) Its my understanding that
.lotus/datastore
is the only folder that needs to be deleted. However if we will be doing a cleanup of the.lotus/datastore
should we also delete other folders like.lotus/sqlite
although its not required .c) For context, this task started from this slack thread.
The text was updated successfully, but these errors were encountered: