-
Notifications
You must be signed in to change notification settings - Fork 844
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 txpool dump/restore race condition #6665
Conversation
Signed-off-by: Fabio Di Fabio <[email protected]>
fc13770
to
b461ed1
Compare
} catch (InterruptedException ie) { | ||
isCancelled.set(false); | ||
} finally { | ||
diskAccessLock.unlock(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we not need the equivalent of releasing in finally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no and this was the error, since the operation is run async, we can't know here when it is done, and so it is not up to us to release the lock, but the lock must be released after the async operation is done with this code CompletableFuture.runAsync(operation).thenRun(diskAccessLock::release));
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]> Signed-off-by: amsmota <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]> Signed-off-by: amsmota <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Most advanced CI tests are deferred until PR approval, but you could:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests
PR description
The disk access was not properly guarded against overlapping dump/restore tasks
Fixed Issue(s)
fixes #6664