[jboss-jira] [JBoss JIRA] Updated: (JBCLUSTER-220) HAPartition.callMethodOnCluster() is not reentrant
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Mon Feb 2 10:58:44 EST 2009
[ https://jira.jboss.org/jira/browse/JBCLUSTER-220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry updated JBCLUSTER-220:
---------------------------------------
Issue Type: Feature Request (was: Bug)
This behavior is inherent in JGroups. In order to ensure ordered delivery of messages from a sender to the application, only one thread at a time is allowed to carry a message to the application from each sender. So if you had a 4 node cluster {A, B, C, D} on A at most 3 threads would be carrying regular messages to the application, one from B, one from C, one from D. Another thread carrying a message from B will block until the first "B" thread returns.
Effect of this is if you use the thread carrying the first "B" message to make a synchronous RPC back into the cluster, the response to your RPC from B can't be received, because the thread carrying the response will block.
To deal with this, use a separate thread to make the synchronous RPC and let the first thread return promptly. Or, make an asynchronous RPC (HAPartition.callAsynchMethodOnCluster(....)).
I'm keeping this JIRA open as I think it's a legit feature request to find a way to make this easier. Off the top of my head, a possible approach would be add a way to tell JGroups to make the response to the RPC an "out-of-band" message, which JGroups will let proceed to the application even though another thread from the sender is already calling on the application.
No matter what, any improvement on this in ha-server-api is going to be based on changes in JGroups. If this is a priority for you, suggest you post on the javagroups-development at lists.sourceforge.net to see what the JGroups devs have to say.
> HAPartition.callMethodOnCluster() is not reentrant
> --------------------------------------------------
>
> Key: JBCLUSTER-220
> URL: https://jira.jboss.org/jira/browse/JBCLUSTER-220
> Project: JBoss Clustering
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: HA-Server-API
> Reporter: Fol de Rol
> Assignee: Brian Stansberry
>
> An RPC handler of callMethodOnCluster() cannot in its turn call callMethodOnCluster() querying other services. The second call blocks until timeout is reached and returns without results.
> The same relates to facilities based on this method like Distributed Replicant Manager.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list