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

En 7369 stop node after offline sync #2248

Merged
merged 8 commits into from
Aug 28, 2020

Conversation

iulianpascalau
Copy link
Contributor

@iulianpascalau iulianpascalau commented Aug 27, 2020

  • added the gracefully close channel in storage header resolver so the import process can safely shutdown the node when completed

Manual testing procedures:

  • provide a db directory containing data in continuous epoch.
  • move this directory into a new directory, might be import-db, place the directory near the config directory.
  • the process can be run either with a partially build db directory or without a DB.
  • change the DestinationShardAsObserver option in prefs.toml to match the containing DB directories and desired shard.
  • use the same config files that have generated the initial import-db data, otherwise the node can not advance
  • run the node with ./node -use-log-view -log-level *:INFO -log-save -import-db ./import-db.
  • the process should iterate on each and every block in advancing in every existing epoch
  • the process stops when it hits an epoch that it has a missing data (this will usually occur after traversing the whole import-db directory)

Note: please check that the node has at least 3 peer connections, otherwise the sync and consensus mechanism are paused.

…e import process can safely shutdown the node when completed
@sasurobert sasurobert self-requested a review August 27, 2020 11:44
sasurobert
sasurobert previously approved these changes Aug 27, 2020
crtEpoch := hdrRes.manualEpochStartNotifier.CurrentEpoch()
strEpochNotFound := fmt.Sprintf("%d", crtEpoch)
if crtEpoch > 1 {
strEpochNotFound = strEpochNotFound + fmt.Sprintf(" or %d", crtEpoch-1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strEpochNotFound += fmt.Sprintf(" or %d", crtEpoch-1)
or maybe if we want to print them in ascending order:
strEpochNotFound = fmt.Sprintf("%d or %d", crtEpoch-1, crtEpoch)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not crtEpoch and crtEpoch+1 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, will change the print

Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System tests passed.

@LucianMincu LucianMincu merged commit 80804ee into development Aug 28, 2020
@LucianMincu LucianMincu deleted the EN-7369-stop-node-after-offline-sync branch August 28, 2020 13:56
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.

None yet

4 participants