activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtaylor <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request: ARTEMIS-456 Synchronize sendReplica...
Date Wed, 23 Mar 2016 15:39:40 GMT
GitHub user mtaylor opened a pull request:

    https://github.com/apache/activemq-artemis/pull/428

    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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mtaylor/activemq-artemis ARTEMIS-456

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/428.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #428
    
----
commit 768b5db9581f5637e59e3c7dc30192b9c369d4bf
Author: Martyn Taylor <mtaylor@redhat.com>
Date:   2016-03-23T15:33:49Z

    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.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message