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
ARTEMIS-1700 Fixed deadlock in paging state #1899
Conversation
Please wait my ack before merging this.. I'm running the whole testsuite! open for discussion only now |
@@ -50,6 +50,16 @@ default int shutdownNow(Consumer<? super Runnable> onPendingTask) { | |||
return 0; | |||
} | |||
|
|||
default boolean flush(long timeout, TimeUnit unit) { | |||
CountDownLatch latch = new CountDownLatch(1); | |||
execute(latch::countDown); |
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.
if the latch is submitted from within the same thread that is executing the tasks, waiting won't be necessary, because it cannot be triggered
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.
This won’t be used at all. It’s just the default implementation for tests. OrderedExecutor has an implementation.
6f104f5
to
1ea9cd6
Compare
1ea9cd6
to
d554a6c
Compare
d554a6c
to
691300d
Compare
it's ready to be merged! testsuite pass! |
So it is a mistake to use global thread pool instead of io thread pool for page cursor. But this does not fix our problem, as you can see
When exit paging state, we will store bookmark for each page subscription and wait until all callbacks done. |
You're right.. Man!!! you're good! :) I will send another PR! |
@shoukunhuai see #1904 |
@shoukunhuai please let me know if you still see any issues... Testsuites have improved after this commit. |
This closes #1894