]
Bela Ban resolved JGRP-1369.
----------------------------
Resolution: Done
Picked option #2. Applied on master and 2.12 branches
MuxRpcDispatcher may encapsulate infinitely RequestOption's
filter with NoMuxHandlerRspFilter
---------------------------------------------------------------------------------------------
Key: JGRP-1369
URL:
https://issues.jboss.org/browse/JGRP-1369
Project: JGroups
Issue Type: Bug
Affects Versions: 2.12.1
Reporter: Benoit Leblanc
Assignee: Bela Ban
Fix For: 2.12.2, 3.0
Attachments: RequestOptTest.java
MuxRpcDispatcher alters RequestOption's filter by encapsulating it with a
NoMuxHandlerRspFilter. Passing the same instance of RequestOptions to rpc calls leads to
:
java.lang.StackOverflowError
at
org.jgroups.blocks.mux.NoMuxHandlerRspFilter.isAcceptable(NoMuxHandlerRspFilter.java:24)
at
org.jgroups.blocks.mux.NoMuxHandlerRspFilter.isAcceptable(NoMuxHandlerRspFilter.java:24)
.....
.....
Solutions :
1/ "Clone" RequestOption at each call like fix used in
https://issues.jboss.org/browse/JGRP-1271. The drawback with this solution, is the
performance concern : useless object creation if a RequestOption is reused.
2/ Don't encapsulate RequestOption if a NoMuxHandlerRspFilter is already setted.
Modification concerns two classes :
* NoMuxHandlerRspFilter
private NoMuxHandlerRspFilter(RspFilter filter) {
this.filter = filter;
}
public static RspFilter createInstance(RspFilter filter) {
if (filter instanceof NoMuxHandlerRspFilter) {
return filter;
}
return new NoMuxHandlerRspFilter(filter) ;
}
* MuxRpcDispatcher
protected GroupRequest cast(Collection<Address> dests, Message msg, RequestOptions
options, boolean blockForResults) {
RspFilter filter = options.getRspFilter();
return super.cast(dests, msg,
options.setRspFilter(NoMuxHandlerRspFilter.createInstance(filter)), blockForResults);
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: