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

ARTEMIS-288 Start close method in separate executor #11

Merged
merged 1 commit into from
Nov 4, 2015

Conversation

mtaylor
Copy link

@mtaylor mtaylor commented Oct 29, 2015

When server sends disconnect to the client, the ClientSession schedules
a close task on it's ordered executor. Once the close method starts
it's waits to check to see if all jobs in it's executor has completed.
To do this it adds a job to it's ordered executor, once it is run it
knows there is nothing more to do and thus is ready to close. However,
this causes a deadlock as both jobs are running in the ordered executor
and thus are both waiting on each other. The close eventually timesout
which is why we see the logs as reported in the JIRA.

This commit runs the close method in it's own ordered executor, thus
preventing the two jobs blocking each other.

https://issues.jboss.org/browse/JBEAP-1562

(cherry picked from commit 26898e4)

When server sends disconnect to the client, the ClientSession schedules
a close task on it's ordered executor.  Once the close method starts
it's waits to check to see if all jobs in it's executor has completed.
To do this it adds a job to it's ordered executor, once it is run it
knows there is nothing more to do and thus is ready to close.  However,
this causes a deadlock as both jobs are running in the ordered executor
and thus are both waiting on each other.  The close eventually timesout
which is why we see the logs as reported in the JIRA.

This commit runs the close method in it's own ordered executor, thus
preventing the two jobs blocking each other.

https://issues.jboss.org/browse/JBEAP-1562

(cherry picked from commit 26898e4)
andytaylor added a commit that referenced this pull request Nov 4, 2015
ARTEMIS-288 Start close method in separate executor
@andytaylor andytaylor merged commit 87b204a into rh-messaging:jboss-1.1.0-x Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants