[
https://issues.jboss.org/browse/JGRP-1905?page=com.atlassian.jira.plugin....
]
Bela Ban edited comment on JGRP-1905 at 1/12/15 4:41 AM:
---------------------------------------------------------
Hi Paul,
I looked at this, but don't see a way to fix this in JGroups (it can be fixed in
WildFly/Infinispan though... read on).
I cannot send a fork-channel=not-available exception or flag back to the RPC caller as the
request message hasn't reached the RequestCorrelator/RpcDispatcher code, so at this
point JGroups doesn't know anything about RPCs yet.
However, you could create (and connect) the fork-channel "web" *before*
connecting the main-chanel "ee", so the code would not throw an NPE:
{code}
JChannel ee=new JChannel(...);
ForkChannel web=new ForkChannel(ee, "stack", "web");
web.connect("bla"); // <-- fork-channel will get connected when main-channel
connects (below)
ee.connect("bla");
{code}
Take a look at [1] for sample code.
[1]
https://github.com/belaban/JGroups/blob/master/tests/junit-functional/org...
was (Author: belaban):
Hi Paul,
I looked at this, but don't see a way to fix this in JGroups (it can be fixed in
WildFly/Infinispan though... read on).
I cannot send a fork-channel=not-available exception or flag back to the RPC caller as the
request message hasn't reached the RequestCorrelator/RpcDispatcher code, so at this
point JGroups doesn't know anything about RPCs yet.
However, you could create (and connect) the fork-channel "web" *before*
connecting the main-chanel "ee", so the code would not throw an NPE:
{code}
JChannel ee=new JChannel(...);
ForkChannel web=new ForkChannel(ee, "stack", "web");
web.connect("bla");
ee.connect*"bla");
{code}
Take a look at [1] for sample code.
[1]
https://github.com/belaban/JGroups/blob/master/tests/junit-functional/org...
FORK: RPCs might block if fork channel or fork stack is not
available
---------------------------------------------------------------------
Key: JGRP-1905
URL:
https://issues.jboss.org/browse/JGRP-1905
Project: JGroups
Issue Type: Bug
Reporter: Bela Ban
Assignee: Bela Ban
Priority: Critical
Fix For: 3.6.2
When we have nodes A,B,C,D, but fork-stack "fs-2" is not available on B, or
fork-channel "ch-3" is not available on B, then an RPC invoked by A on all
cluster nodes will time out.
h5. Solution
* Throw an exception on B if a fork-stack or -channel is not available on a target node.
This way, the RPC would return quickly and B's response would be set to the exception
(e.g. "fork channel fc-2 not available").
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)