[1/3] activemq-artemis git commit: ARTEMIS-1966 Replication channel closed but not connection if flow controlled during replication
Repository: activemq-artemis Updated Branches: refs/heads/2.6.x 0791ee274 -> b703ca315 ARTEMIS-1966 Replication channel closed but not connection if flow controlled during replication (cherry picked from commit 9f8288c0156072b3ae02efd04e1adbcd0abca2c2) Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8647ef65 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8647ef65 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8647ef65 Branch: refs/heads/2.6.x Commit: 8647ef65c1ff88c8f50366b12798bb573ce1f331 Parents: 0791ee2 Author: yang wei Authored: Thu Jul 5 17:48:11 2018 +0800 Committer: Clebert Suconic Committed: Thu Jul 12 14:50:59 2018 -0400 -- .../core/replication/ReplicationManager.java| 1 + ...SharedNothingReplicationFlowControlTest.java | 295 +++ 2 files changed, 296 insertions(+) -- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8647ef65/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java -- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java index be5963a..fbf7c6c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java @@ -302,6 +302,7 @@ public final class ReplicationManager implements ActiveMQComponent { RemotingConnection toStop = remotingConnection; if (toStop != null) { toStop.removeFailureListener(failureListener); + toStop.destroy(); } remotingConnection = null; started = false; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8647ef65/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java -- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java new file mode 100644 index 000..381b617 --- /dev/null +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java @@ -0,0 +1,295 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.activemq.artemis.tests.integration.replication; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.activemq.artemis.api.core.ActiveMQException; +import org.apache.activemq.artemis.api.core.Interceptor; +import org.apache.activemq.artemis.api.core.RoutingType; +import org.apache.activemq.artemis.api.core.client.ClientMessage; +import org.apache.activemq.artemis.api.core.client.ClientProducer; +import org.apache.activemq.artemis.api.core.client.ClientSession; +import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; +import org.apache.activemq.artemis.api.core.client.ServerLocator; +import org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl; +import org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration; +import org.apache.activemq.artemis.core.config.Configuration; +import org.apache.activemq.artemis.core.config.ha.ReplicaPolicyConfiguration; +import org.apache.activemq.artemis.core.config.ha.ReplicatedPolicyConfiguration;
[1/3] activemq-artemis git commit: ARTEMIS-1966 Replication channel closed but not connection if flow controlled during replication
Repository: activemq-artemis Updated Branches: refs/heads/master e66a42fa7 -> 8d9ec3e5a ARTEMIS-1966 Replication channel closed but not connection if flow controlled during replication Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/9f8288c0 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/9f8288c0 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/9f8288c0 Branch: refs/heads/master Commit: 9f8288c0156072b3ae02efd04e1adbcd0abca2c2 Parents: e66a42f Author: yang wei Authored: Thu Jul 5 17:48:11 2018 +0800 Committer: Clebert Suconic Committed: Thu Jul 12 13:47:39 2018 -0400 -- .../core/replication/ReplicationManager.java| 1 + ...SharedNothingReplicationFlowControlTest.java | 295 +++ 2 files changed, 296 insertions(+) -- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9f8288c0/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java -- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java index be5963a..fbf7c6c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java @@ -302,6 +302,7 @@ public final class ReplicationManager implements ActiveMQComponent { RemotingConnection toStop = remotingConnection; if (toStop != null) { toStop.removeFailureListener(failureListener); + toStop.destroy(); } remotingConnection = null; started = false; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9f8288c0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java -- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java new file mode 100644 index 000..381b617 --- /dev/null +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/SharedNothingReplicationFlowControlTest.java @@ -0,0 +1,295 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.activemq.artemis.tests.integration.replication; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.activemq.artemis.api.core.ActiveMQException; +import org.apache.activemq.artemis.api.core.Interceptor; +import org.apache.activemq.artemis.api.core.RoutingType; +import org.apache.activemq.artemis.api.core.client.ClientMessage; +import org.apache.activemq.artemis.api.core.client.ClientProducer; +import org.apache.activemq.artemis.api.core.client.ClientSession; +import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; +import org.apache.activemq.artemis.api.core.client.ServerLocator; +import org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl; +import org.apache.activemq.artemis.core.config.ClusterConnectionConfiguration; +import org.apache.activemq.artemis.core.config.Configuration; +import org.apache.activemq.artemis.core.config.ha.ReplicaPolicyConfiguration; +import org.apache.activemq.artemis.core.config.ha.ReplicatedPolicyConfiguration; +import