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

Fix rocksdb error when shutting down and processing at the same time. #4250

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

asdacap
Copy link
Contributor

@asdacap asdacap commented Jul 7, 2022

Fixes #4233

Fix exception on shutting down when TrieStore attempt to dispose batch while another thread is updating it.

Changes:

  • Dont shotdown first on start. TrieStore already in dispose stack.

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests??

  • Yes
  • No

Comments about testing , should you have some (optional)

  • Run ropsten with full sync only. Start and stop 10 consecutive time during sync, no more exception. Previously it would take less than 5 tries.

@asdacap asdacap requested a review from LukaszRozmej July 7, 2022 10:50
Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

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

Generally looks good, but please test some scenarios before merging, including different shutdown modes.

@asdacap
Copy link
Contributor Author

asdacap commented Jul 7, 2022

What kind of shutdown modes?

@LukaszRozmej
Copy link
Member

What kind of shutdown modes?

In-docker for example.

@asdacap
Copy link
Contributor Author

asdacap commented Jul 7, 2022

SIGTERM/SIGINT works the same as expected. SIGKILL causes a lot of replay as expected, which another SIGTERM reduce.

@asdacap asdacap merged commit 3b5a508 into master Jul 7, 2022
@asdacap asdacap deleted the fix-rocksdb-exception-on-close branch July 7, 2022 12:22
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.

PersistingTrie on shutdown has to be exclusive with block processing
2 participants