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

ISPN-6068 Upgrade to JGroups 3.6.7.Final #3935

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<version.cdi>1.0-SP4</version.cdi>
<version.jboss.marshalling>1.4.10.Final</version.jboss.marshalling>
<version.jboss.logging>3.3.0.Final</version.jboss.logging>
<version.jgroups>3.6.4.Final</version.jgroups>
<version.jgroups>3.6.7.Final</version.jgroups>
<version.jta>1.0.1.Final</version.jta>
<version.netty>4.0.25.Final</version.netty>
<version.osgi>4.3.1</version.osgi>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@
public class CommandAwareRpcDispatcher extends RpcDispatcher {
public static final RspList<Response> EMPTY_RESPONSES_LIST = new RspList<>();

static class LogWrapper {
// Dummy class to workaround JGRP-1942
}

private static final Log log = LogFactory.getLog(CommandAwareRpcDispatcher.LogWrapper.class);
private static final Log log = LogFactory.getLog(CommandAwareRpcDispatcher.class);
private static final boolean trace = log.isTraceEnabled();
private static final boolean FORCE_MCAST = Boolean.getBoolean("infinispan.unsafe.force_multicast");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.jgroups.conf.ProtocolConfiguration;
import org.jgroups.conf.ProtocolStackConfigurator;
import org.jgroups.conf.XmlConfigurator;
import org.jgroups.protocols.TCP_NIO;

import java.util.ArrayList;
import java.util.HashMap;
Expand All @@ -20,6 +21,7 @@
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.MERGE3;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.RELAY2;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.TCP;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.TCP_NIO2;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.TEST_PING;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.UDP;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.VERIFY_SUSPECT;
Expand Down Expand Up @@ -171,7 +173,8 @@ private static String replaceMCastAddressAndPort(JGroupsProtocolCfg jgroupsCfg)
}

private static String replaceTcpStartPort(JGroupsProtocolCfg jgroupsCfg, TransportFlags transportFlags) {
Map<String, String> props = jgroupsCfg.getProtocol(TCP).getProperties();
ProtocolType transportProtocol = jgroupsCfg.containsProtocol(TCP_NIO2) ? TCP_NIO2 : TCP;
Map<String, String> props = jgroupsCfg.getProtocol(transportProtocol).getProperties();
Integer startPort = threadTcpStartPort.get();
int portRange = TCP_PORT_RANGE_PER_THREAD;
if (transportFlags.isSiteIndexSpecified()) {
Expand All @@ -185,7 +188,7 @@ private static String replaceTcpStartPort(JGroupsProtocolCfg jgroupsCfg, Transpo
props.put("bind_port", startPort.toString());
// In JGroups, the port_range is inclusive
props.put("port_range", String.valueOf(portRange - 1));
return replaceProperties(jgroupsCfg, props, TCP);
return replaceProperties(jgroupsCfg, props, transportProtocol);
}

private static String replaceProperties(
Expand Down Expand Up @@ -290,7 +293,7 @@ public String toString() {
}

enum ProtocolType {
TCP, UDP, SHARED_LOOPBACK,
TCP, TCP_NIO2, UDP, SHARED_LOOPBACK,
MPING, PING, TCPPING, TEST_PING, SHARED_LOOPBACK_PING,
MERGE2, MERGE3,
FD_SOCK, FD, VERIFY_SUSPECT, FD_ALL, FD_ALL2,
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/stacks/broken-tcp.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">
<TCP
bind_addr="${jgroups.tcp.address:127.0.0.1}"
bind_port="${jgroups.tcp.port:7800}"
Expand Down
11 changes: 6 additions & 5 deletions core/src/test/resources/stacks/tcp.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
<TCP
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">
<!-- Disable the regular thread pool queue for tests so we can set a lower min_threads -->
<TCP_NIO2
bind_addr="${jgroups.tcp.address:127.0.0.1}"
bind_port="${jgroups.tcp.port:7800}"
port_range="30"
Expand All @@ -16,10 +17,10 @@
thread_naming_pattern="pl"

thread_pool.enabled="true"
thread_pool.min_threads="2"
thread_pool.max_threads="2"
thread_pool.min_threads="1"
thread_pool.max_threads="5"
thread_pool.keep_alive_time="60000"
thread_pool.queue_enabled="true"
thread_pool.queue_enabled="false"
thread_pool.queue_max_size="100"
thread_pool.rejection_policy="Discard"

Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/stacks/tcp_mping/tcp1.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">
<TCP bind_port="7800"
port_range="30"
recv_buf_size="20000000"
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/stacks/tcp_mping/tcp2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">
<TCP bind_port="7800"
port_range="30"
recv_buf_size="20000000"
Expand Down
4 changes: 2 additions & 2 deletions core/src/test/resources/stacks/udp.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">
<UDP
mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}"
mcast_port="${jgroups.udp.mcast_port:46655}"
Expand All @@ -20,7 +20,7 @@
thread_pool.min_threads="1"
thread_pool.max_threads="5"
thread_pool.keep_alive_time="60000"
thread_pool.queue_enabled="true"
thread_pool.queue_enabled="false"
thread_pool.queue_max_size="100"
thread_pool.rejection_policy="Discard"

Expand Down
2 changes: 1 addition & 1 deletion demos/gui/src/main/release/etc/config/jgroups-relay1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">
<UDP mcast_addr="239.1.1.1"
mcast_port="${jgroups.udp.mcast_port:45111}"
tos="8"
Expand Down
2 changes: 1 addition & 1 deletion demos/gui/src/main/release/etc/config/jgroups-relay2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">
<UDP mcast_addr="239.2.2.2"
mcast_port="${jgroups.udp.mcast_port:45222}"
tos="8"
Expand Down
2 changes: 1 addition & 1 deletion demos/gui/src/main/release/etc/config/jgroups-tcp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">
<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
send_buf_size="640000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">

<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">

<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">

<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">

<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">

<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">

<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">

<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.6.xsd">

<TCP bind_port="7800" port_range="10"
recv_buf_size="20000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ public Object handleUnknownForkChannel(Message message, String forkChannelId) {
private Object handle(Message message) {
Header header = (Header) message.getHeader(this.id);
// If this is a request expecting a response, don't leave the requester hanging - send an identifiable response on which it can filter
if ((header != null) && (header.type == Header.REQ) && header.rsp_expected) {
if ((header != null) && (header.type == Header.REQ) && header.rspExpected()) {
Message response = message.makeReply().setFlag(message.getFlags()).clearFlag(Message.Flag.RSVP, Message.Flag.SCOPED);

response.putHeader(FORK.ID, message.getHeader(FORK.ID));
response.putHeader(this.id, new Header(Header.RSP, header.id, false, this.id));
response.putHeader(this.id, new Header(Header.RSP, header.req_id, this.id));
response.setBuffer(UNKNOWN_FORK_RESPONSE.array());

channel.down(new Event(Event.MSG, response));
Expand Down