Skip to content

Commit

Permalink
ISPN-13929 Use new JGroups 5 protocols
Browse files Browse the repository at this point in the history
* FD_SOCK -> FD_SOCK2
* VERIFY_SUSPECT -> VERIFY_SUSPECT2
* FRAG3 -> FRAG4
* Remove deprecated attribute GMS.max_leave_attempts
  • Loading branch information
pruivo authored and tristantarrant committed Jun 17, 2022
1 parent 59747d7 commit 739020b
Show file tree
Hide file tree
Showing 38 changed files with 106 additions and 188 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<MERGE3 min_interval="10000"
max_interval="30000"
/>
<FD_SOCK start_port="${jgroups.fd.port:57600}"/>
<FD_SOCK2 offset="${jgroups.fd.port-offset:50000}"/>
<!-- Suspect node `timeout` millis after the last heartbeat -->
<FD_ALL3 timeout="10000"
interval="2000"
/>
<VERIFY_SUSPECT timeout="1000"/>
<VERIFY_SUSPECT2 timeout="1000"/>
<pbcast.NAKACK2 use_mcast_xmit="false"
xmit_interval="200"
xmit_table_num_rows="50"
Expand All @@ -60,5 +60,5 @@
<MFC max_credits="4m"
min_threshold="0.40"
/>
<FRAG3/>
<FRAG4/>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<MERGE3 min_interval="10000"
max_interval="30000"
/>
<FD_SOCK start_port="${jgroups.fd.port:57600}"/>
<FD_SOCK2 offset="${jgroups.fd.port-offset:50000}"/>
<!-- Suspect node `timeout` millis after the last heartbeat -->
<FD_ALL3 timeout="10000"
interval="2000"
/>
<VERIFY_SUSPECT timeout="1000"/>
<VERIFY_SUSPECT2 timeout="1000"/>
<pbcast.NAKACK2 use_mcast_xmit="false"
xmit_interval="200"
xmit_table_num_rows="50"
Expand All @@ -59,5 +59,5 @@
<MFC max_credits="4m"
min_threshold="0.40"
/>
<FRAG3/>
<FRAG4/>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
<MERGE3 min_interval="10000"
max_interval="30000"
/>
<FD_SOCK start_port="${jgroups.fd.port:57600}"/>
<FD_SOCK2 offset="${jgroups.fd.port-offset:50000}"/>
<!-- Suspect node `timeout` millis after the last heartbeat -->
<FD_ALL3 timeout="10000"
interval="2000"
/>
<VERIFY_SUSPECT timeout="1000"/>
<VERIFY_SUSPECT2 timeout="1000"/>
<pbcast.NAKACK2 use_mcast_xmit="false"
xmit_interval="200"
xmit_table_num_rows="50"
Expand All @@ -60,5 +60,5 @@
<MFC max_credits="4m"
min_threshold="0.40"
/>
<FRAG3/>
<FRAG4/>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
<MERGE3 min_interval="10000"
max_interval="30000"
/>
<FD_SOCK start_port="${jgroups.fd.port:57600}"/>
<FD_SOCK2 offset="${jgroups.fd.port-offset:50000}"/>
<!-- Suspect node `timeout` millis after the last heartbeat -->
<FD_ALL3 timeout="10000"
interval="2000"
/>
<VERIFY_SUSPECT timeout="1000"/>
<VERIFY_SUSPECT2 timeout="1000"/>
<pbcast.NAKACK2 use_mcast_xmit="false"
xmit_interval="200"
xmit_table_num_rows="50"
Expand All @@ -61,5 +61,5 @@
<MFC max_credits="4m"
min_threshold="0.40"
/>
<FRAG3/>
<FRAG4/>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
<MERGE3 min_interval="10000"
max_interval="30000"
/>
<FD_SOCK start_port="${jgroups.fd.port:57600}"/>
<FD_SOCK2 offset="${jgroups.fd.port-offset:50000}"/>
<!-- Suspect node `timeout` millis after the last heartbeat -->
<FD_ALL3 timeout="10000"
interval="2000"
/>
<VERIFY_SUSPECT timeout="1000"/>
<VERIFY_SUSPECT2 timeout="1000"/>
<pbcast.NAKACK2 use_mcast_xmit="false"
xmit_interval="200"
xmit_table_num_rows="50"
Expand All @@ -56,5 +56,5 @@
<MFC max_credits="4m"
min_threshold="0.40"
/>
<FRAG3/>
<FRAG4/>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<MERGE3 min_interval="10000"
max_interval="30000"
/>
<FD_SOCK start_port="${jgroups.fd.port:54200}"/>
<FD_SOCK2 offset="${jgroups.fd.port-offset:50000}"/>
<!-- Suspect node `timeout` millis after the last heartbeat -->
<FD_ALL3 timeout="10000"
interval="2000"
/>
<VERIFY_SUSPECT timeout="1000"/>
<VERIFY_SUSPECT2 timeout="1000"/>
<pbcast.NAKACK2 xmit_interval="100"
xmit_table_num_rows="50"
xmit_table_msgs_per_row="1024"
Expand All @@ -57,5 +57,5 @@
<MFC max_credits="4m"
min_threshold="0.40"
/>
<FRAG3 frag_size="8000"/>
<FRAG4 frag_size="8000"/>
</config>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.FD_ALL2;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.FD_ALL3;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.FD_SOCK;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.FD_SOCK2;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.LOCAL_PING;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.MERGE3;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.MPING;
Expand All @@ -15,6 +16,7 @@
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.TEST_RELAY2;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.UDP;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.VERIFY_SUSPECT;
import static org.infinispan.test.fwk.JGroupsConfigBuilder.ProtocolType.VERIFY_SUSPECT2;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down Expand Up @@ -46,7 +48,7 @@ public class JGroupsConfigBuilder {
public static final String JGROUPS_STACK;
private static final Map<String, ProtocolStackConfigurator> protocolStackConfigurator = new HashMap<>();

private static final ThreadLocal<Integer> threadTcpIndex = new ThreadLocal<Integer>() {
private static final ThreadLocal<Integer> threadTcpIndex = new ThreadLocal<>() {
private final AtomicInteger counter = new AtomicInteger(0);

@Override
Expand All @@ -58,7 +60,7 @@ protected Integer initialValue() {
/**
* Holds unique mcast_addr for each thread used for JGroups channel construction.
*/
private static final ThreadLocal<Integer> threadUdpIndex = new ThreadLocal<Integer>() {
private static final ThreadLocal<Integer> threadUdpIndex = new ThreadLocal<>() {
private final AtomicInteger counter = new AtomicInteger(0);

@Override
Expand Down Expand Up @@ -144,9 +146,9 @@ private static void removeMerge(JGroupsProtocolCfg jgroupsCfg) {
* protocols from the given JGroups stack.
*/
private static void removeFailureDetection(JGroupsProtocolCfg jgroupsCfg) {
jgroupsCfg.removeProtocol(FD).removeProtocol(FD_SOCK)
jgroupsCfg.removeProtocol(FD).removeProtocol(FD_SOCK).removeProtocol(FD_SOCK2)
.removeProtocol(FD_ALL).removeProtocol(FD_ALL2).removeProtocol(FD_ALL3)
.removeProtocol(VERIFY_SUSPECT);
.removeProtocol(VERIFY_SUSPECT).removeProtocol(VERIFY_SUSPECT2);
}

private static void removeRelay2(JGroupsProtocolCfg jgroupsCfg) {
Expand Down Expand Up @@ -294,15 +296,15 @@ enum ProtocolType {
RED,
MPING, PING, TCPPING, LOCAL_PING, SHARED_LOOPBACK_PING,
MERGE2, MERGE3,
FD_SOCK, FD, VERIFY_SUSPECT, FD_ALL, FD_ALL2, FD_ALL3,
FD_SOCK, FD, VERIFY_SUSPECT, VERIFY_SUSPECT2, FD_ALL, FD_ALL2, FD_ALL3, FD_SOCK2,
BARRIER,
UNICAST, UNICAST2, UNICAST3,
NAKACK, NAKACK2,
RSVP,
STABLE,
GMS,
UFC, MFC, FC, UFC_NB, MFC_NB,
FRAG2, FRAG3,
FRAG2, FRAG3, FRAG4,
STREAMING_STATE_TRANSFER,
TEST_RELAY2
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/configs/all/10.0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
xmlns="urn:org:jgroups"/>

<MERGE3 xmlns="urn:org:jgroups"/>
<FD_SOCK xmlns="urn:org:jgroups"/>
<FD_SOCK2 xmlns="urn:org:jgroups"/>
<FD_ALL3 timeout="3000"
interval="1000"
timeout_check_interval="1000"
xmlns="urn:org:jgroups"
/>
<VERIFY_SUSPECT timeout="1000" xmlns="urn:org:jgroups"/>
<VERIFY_SUSPECT2 timeout="1000" xmlns="urn:org:jgroups"/>
<pbcast.NAKACK2
use_mcast_xmit="false"
xmit_interval="200"
Expand All @@ -54,7 +54,7 @@
xmlns="urn:org:jgroups"/>
<UFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<MFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<FRAG3 xmlns="urn:org:jgroups"/>
<FRAG4 xmlns="urn:org:jgroups"/>
</stack>
<!-- Use the "tcp" stack but override some protocol attributes -->
<stack name="mytcp" extends="tcp-test">
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/configs/all/10.1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
xmlns="urn:org:jgroups"/>

<MERGE3 xmlns="urn:org:jgroups"/>
<FD_SOCK xmlns="urn:org:jgroups"/>
<FD_SOCK2 xmlns="urn:org:jgroups"/>
<FD_ALL3 timeout="3000"
interval="1000"
timeout_check_interval="1000"
xmlns="urn:org:jgroups"
/>
<VERIFY_SUSPECT timeout="1000" xmlns="urn:org:jgroups"/>
<VERIFY_SUSPECT2 timeout="1000" xmlns="urn:org:jgroups"/>
<pbcast.NAKACK2
use_mcast_xmit="false"
xmit_interval="200"
Expand All @@ -54,7 +54,7 @@
xmlns="urn:org:jgroups"/>
<UFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<MFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<FRAG3 xmlns="urn:org:jgroups"/>
<FRAG4 xmlns="urn:org:jgroups"/>
</stack>
<!-- Use the "tcp" stack but override some protocol attributes -->
<stack name="mytcp" extends="tcp-test">
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/configs/all/11.0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
xmlns="urn:org:jgroups"/>

<MERGE3 xmlns="urn:org:jgroups"/>
<FD_SOCK xmlns="urn:org:jgroups"/>
<FD_SOCK2 xmlns="urn:org:jgroups"/>
<FD_ALL3 timeout="3000"
interval="1000"
xmlns="urn:org:jgroups"
/>
<VERIFY_SUSPECT timeout="1000" xmlns="urn:org:jgroups"/>
<VERIFY_SUSPECT2 timeout="1000" xmlns="urn:org:jgroups"/>
<pbcast.NAKACK2
use_mcast_xmit="false"
xmit_interval="200"
Expand All @@ -53,7 +53,7 @@
xmlns="urn:org:jgroups"/>
<UFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<MFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<FRAG3 xmlns="urn:org:jgroups"/>
<FRAG4 xmlns="urn:org:jgroups"/>
</stack>
<!-- Use the "tcp" stack but override some protocol attributes -->
<stack name="mytcp" extends="tcp-test">
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/configs/all/12.0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
xmlns="urn:org:jgroups"/>

<MERGE3 xmlns="urn:org:jgroups"/>
<FD_SOCK xmlns="urn:org:jgroups"/>
<FD_SOCK2 xmlns="urn:org:jgroups"/>
<FD_ALL3 timeout="3000"
interval="1000"
xmlns="urn:org:jgroups"
/>
<VERIFY_SUSPECT timeout="1000" xmlns="urn:org:jgroups"/>
<VERIFY_SUSPECT2 timeout="1000" xmlns="urn:org:jgroups"/>
<pbcast.NAKACK2
use_mcast_xmit="false"
xmit_interval="200"
Expand All @@ -55,7 +55,7 @@
xmlns="urn:org:jgroups"/>
<UFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<MFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<FRAG3 xmlns="urn:org:jgroups"/>
<FRAG4 xmlns="urn:org:jgroups"/>
</stack>
<!-- Use the "tcp" stack but override some protocol attributes -->
<stack name="mytcp" extends="tcp-test">
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/configs/all/12.1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
xmlns="urn:org:jgroups"/>

<MERGE3 xmlns="urn:org:jgroups"/>
<FD_SOCK xmlns="urn:org:jgroups"/>
<FD_SOCK2 xmlns="urn:org:jgroups"/>
<FD_ALL3 timeout="3000"
interval="1000"
xmlns="urn:org:jgroups"
/>
<VERIFY_SUSPECT timeout="1000" xmlns="urn:org:jgroups"/>
<VERIFY_SUSPECT2 timeout="1000" xmlns="urn:org:jgroups"/>
<pbcast.NAKACK2
use_mcast_xmit="false"
xmit_interval="200"
Expand All @@ -55,7 +55,7 @@
xmlns="urn:org:jgroups"/>
<UFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<MFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<FRAG3 xmlns="urn:org:jgroups"/>
<FRAG4 xmlns="urn:org:jgroups"/>
</stack>
<!-- Use the "tcp" stack but override some protocol attributes -->
<stack name="mytcp" extends="tcp-test">
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/configs/all/13.0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
xmlns="urn:org:jgroups"/>

<MERGE3 xmlns="urn:org:jgroups"/>
<FD_SOCK xmlns="urn:org:jgroups"/>
<FD_SOCK2 xmlns="urn:org:jgroups"/>
<FD_ALL3 timeout="3000"
interval="1000"
xmlns="urn:org:jgroups"
/>
<VERIFY_SUSPECT timeout="1000" xmlns="urn:org:jgroups"/>
<VERIFY_SUSPECT2 timeout="1000" xmlns="urn:org:jgroups"/>
<pbcast.NAKACK2
use_mcast_xmit="false"
xmit_interval="200"
Expand All @@ -57,7 +57,7 @@
xmlns="urn:org:jgroups"/>
<UFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<MFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<FRAG3 xmlns="urn:org:jgroups"/>
<FRAG4 xmlns="urn:org:jgroups"/>
</stack>
<!-- Use the "tcp" stack but override some protocol attributes -->
<stack name="mytcp" extends="tcp-test">
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/configs/all/14.0.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
xmlns="urn:org:jgroups"/>

<MERGE3 xmlns="urn:org:jgroups"/>
<FD_SOCK xmlns="urn:org:jgroups"/>
<FD_SOCK2 xmlns="urn:org:jgroups"/>
<FD_ALL3 timeout="3000"
interval="1000"
xmlns="urn:org:jgroups"
/>
<VERIFY_SUSPECT timeout="1000" xmlns="urn:org:jgroups"/>
<VERIFY_SUSPECT2 timeout="1000" xmlns="urn:org:jgroups"/>
<pbcast.NAKACK2
use_mcast_xmit="false"
xmit_interval="200"
Expand All @@ -57,7 +57,7 @@
xmlns="urn:org:jgroups"/>
<UFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<MFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<FRAG3 xmlns="urn:org:jgroups"/>
<FRAG4 xmlns="urn:org:jgroups"/>
</stack>
<!-- Use the "tcp" stack but override some protocol attributes -->
<stack name="mytcp" extends="tcp-test">
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/configs/config-with-jgroups-stack.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
ip_ttl="${jgroups.udp.ip_ttl:2}"
xmlns="urn:org:jgroups"/>
<MERGE3 xmlns="urn:org:jgroups"/>
<FD_SOCK xmlns="urn:org:jgroups"/>
<FD_SOCK2 xmlns="urn:org:jgroups"/>
<FD_ALL3 timeout="3000"
interval="1000"
xmlns="urn:org:jgroups"
/>
<VERIFY_SUSPECT timeout="1000" xmlns="urn:org:jgroups"/>
<VERIFY_SUSPECT2 timeout="1000" xmlns="urn:org:jgroups"/>
<pbcast.NAKACK2
use_mcast_xmit="false"
xmit_interval="200"
Expand All @@ -51,7 +51,7 @@
xmlns="urn:org:jgroups"/>
<UFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<MFC max_credits="4m" min_threshold="0.40" xmlns="urn:org:jgroups"/>
<FRAG3 xmlns="urn:org:jgroups"/>
<FRAG4 xmlns="urn:org:jgroups"/>
</stack>
</jgroups>
<cache-container name="default" statistics="true">
Expand Down

0 comments on commit 739020b

Please sign in to comment.