You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2016/03/23 16:53:14 UTC

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

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0030918fe -> beae4265a


This closes #428


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

Branch: refs/heads/master
Commit: beae4265a24832873b782303385b64fc1b2452b1
Parents: 0030918 afdb78d
Author: jbertram <jb...@apache.org>
Authored: Wed Mar 23 10:52:56 2016 -0500
Committer: jbertram <jb...@apache.org>
Committed: Wed Mar 23 10:52:56 2016 -0500

----------------------------------------------------------------------
 .../activemq/artemis/core/replication/ReplicationManager.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[2/2] activemq-artemis git commit: ARTEMIS-456 Synchronize sendReplicatePacket method

Posted by jb...@apache.org.
ARTEMIS-456 Synchronize sendReplicatePacket method

There is a potential deadlock scenario if 2 threads try
sendReplicatePacket.  Thread 1 registers Netty callback which will
invoke readyForWrites() method, which locks the callback list and waits
on the replicationLock.  Thread 2 enters sendReplicatePacket and gets
the replicationLock and is blocked on the callback list lock.  This fix
ensures the sendReplicatePacket blocks on the ReplicationManager meaning
no interleaving of the Netty callback thread and the wait on lock can
happen.


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

Branch: refs/heads/master
Commit: afdb78dd5c8aae5d39e53f4b6390708f3602761f
Parents: 0030918
Author: Martyn Taylor <mt...@redhat.com>
Authored: Wed Mar 23 15:33:49 2016 +0000
Committer: jbertram <jb...@apache.org>
Committed: Wed Mar 23 10:52:56 2016 -0500

----------------------------------------------------------------------
 .../activemq/artemis/core/replication/ReplicationManager.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/afdb78dd/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 a393816..4aabbea 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
@@ -330,7 +330,7 @@ public final class ReplicationManager implements ActiveMQComponent, ReadyListene
       return sendReplicatePacket(packet, true);
    }
 
-   private OperationContext sendReplicatePacket(final Packet packet, boolean lineUp) {
+   private synchronized OperationContext sendReplicatePacket(final Packet packet, boolean lineUp) {
       if (!enabled)
          return null;
       boolean runItNow = false;