You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2018/05/30 02:33:46 UTC

[1/2] activemq-artemis git commit: ARTEMIS-1891 use io executor to send replicate packet

Repository: activemq-artemis
Updated Branches:
  refs/heads/master fbcee58e8 -> 183ebcc5f


ARTEMIS-1891 use io executor to send replicate packet

After sending pages, the thread will hold the storage manager write lock
and send synchronization finished packet(use the parent thread pool) to
the backup node. At the same time, thread pool is full bcs they are
waiting for the storage manager read lock to write the page or journal,
leading to replication starting failure. Here we use io executor to send
replicate packet to fix thread pool starvation problem.


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/06eb82cb
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/06eb82cb
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/06eb82cb

Branch: refs/heads/master
Commit: 06eb82cb1408a045037be82873c97d235946a761
Parents: fbcee58
Author: yang wei <wy...@gmail.com>
Authored: Mon May 28 14:12:21 2018 +0800
Committer: yang wei <wy...@gmail.com>
Committed: Tue May 29 10:15:50 2018 +0800

----------------------------------------------------------------------
 .../artemis/core/replication/ReplicationManager.java      | 10 +++++-----
 .../core/server/impl/SharedNothingLiveActivation.java     |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/06eb82cb/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 3642272..be5963a 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
@@ -120,7 +120,7 @@ public final class ReplicationManager implements ActiveMQComponent {
 
    private final Queue<OperationContext> pendingTokens = new ConcurrentLinkedQueue<>();
 
-   private final ExecutorFactory executorFactory;
+   private final ExecutorFactory ioExecutorFactory;
 
    private final Executor replicationStream;
 
@@ -142,12 +142,12 @@ public final class ReplicationManager implements ActiveMQComponent {
    public ReplicationManager(CoreRemotingConnection remotingConnection,
                              final long timeout,
                              final long initialReplicationSyncTimeout,
-                             final ExecutorFactory executorFactory) {
-      this.executorFactory = executorFactory;
+                             final ExecutorFactory ioExecutorFactory) {
+      this.ioExecutorFactory = ioExecutorFactory;
       this.initialReplicationSyncTimeout = initialReplicationSyncTimeout;
       this.replicatingChannel = remotingConnection.getChannel(CHANNEL_ID.REPLICATION.id, -1);
       this.remotingConnection = remotingConnection;
-      this.replicationStream = executorFactory.getExecutor();
+      this.replicationStream = ioExecutorFactory.getExecutor();
       this.timeout = timeout;
    }
 
@@ -355,7 +355,7 @@ public final class ReplicationManager implements ActiveMQComponent {
          return null;
       }
 
-      final OperationContext repliToken = OperationContextImpl.getContext(executorFactory);
+      final OperationContext repliToken = OperationContextImpl.getContext(ioExecutorFactory);
       if (lineUp) {
          repliToken.replicationLineUp();
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/06eb82cb/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java
index 2e289b5..c03fd19 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java
@@ -169,7 +169,7 @@ public class SharedNothingLiveActivation extends LiveActivation {
          ReplicationFailureListener listener = new ReplicationFailureListener();
          rc.addCloseListener(listener);
          rc.addFailureListener(listener);
-         replicationManager = new ReplicationManager(rc, clusterConnection.getCallTimeout(), replicatedPolicy.getInitialReplicationSyncTimeout(), activeMQServer.getExecutorFactory());
+         replicationManager = new ReplicationManager(rc, clusterConnection.getCallTimeout(), replicatedPolicy.getInitialReplicationSyncTimeout(), activeMQServer.getIOExecutorFactory());
          replicationManager.start();
          Thread t = new Thread(new Runnable() {
             @Override


[2/2] activemq-artemis git commit: This closes #2114

Posted by cl...@apache.org.
This closes #2114


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/183ebcc5
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/183ebcc5
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/183ebcc5

Branch: refs/heads/master
Commit: 183ebcc5f86befb4bb37777fcc9a3bbf70c5f33f
Parents: fbcee58 06eb82c
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue May 29 22:29:02 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue May 29 22:29:02 2018 -0400

----------------------------------------------------------------------
 .../artemis/core/replication/ReplicationManager.java      | 10 +++++-----
 .../core/server/impl/SharedNothingLiveActivation.java     |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------