You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/08/16 19:44:00 UTC

[jira] [Commented] (ARTEMIS-1353) Replication packets can get out of order

    [ https://issues.apache.org/jira/browse/ARTEMIS-1353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16129311#comment-16129311 ] 

ASF GitHub Bot commented on ARTEMIS-1353:
-----------------------------------------

GitHub user jbertram opened a pull request:

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

    ARTEMIS-1353 ensure replication packet order

    Incorrect ordering of replication packets may happen because of
    useExecutor parameter in the sendReplicatePacket method.
    ReplicationStartSyncMessage packets are sent as first, but they are sent
    with useExecutor=true. Although ReplicationSyncFileMessage packets are
    sent after ReplicationStartSyncMessage packets, they are sent with
    useExecutor=false. So sending of ReplicationStartSyncMessage packets is
    scheduled to executor and there is no guarantee when the task will be
    executed, whereas ReplicationStartSyncMessage packets are sent
    immediately.
    
    The solution is to wait for an ack for ReplicationStartSyncMessages.

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

    $ git pull https://github.com/jbertram/activemq-artemis ARTEMIS-1353

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

    https://github.com/apache/activemq-artemis/pull/1466.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 #1466
    
----
commit a9f3dcfb10314763d5feeff6d56de9694cc0ede1
Author: Justin Bertram <jb...@apache.org>
Date:   2017-08-16T17:08:31Z

    ARTEMIS-1353 ensure replication packet order
    
    Incorrect ordering of replication packets may happen because of
    useExecutor parameter in the sendReplicatePacket method.
    ReplicationStartSyncMessage packets are sent as first, but they are sent
    with useExecutor=true. Although ReplicationSyncFileMessage packets are
    sent after ReplicationStartSyncMessage packets, they are sent with
    useExecutor=false. So sending of ReplicationStartSyncMessage packets is
    scheduled to executor and there is no guarantee when the task will be
    executed, whereas ReplicationStartSyncMessage packets are sent
    immediately.
    
    The solution is to wait for an ack for ReplicationStartSyncMessages.

----


> Replication packets can get out of order
> ----------------------------------------
>
>                 Key: ARTEMIS-1353
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1353
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>             Fix For: 2.3.0
>
>
> {{ReplicationEndpoint}} my throw a {{NullPointerException}} during initial synchronization.
> The issue is caused by incorrect ordering of replication packets. The NPE arises when {{ReplicationSyncFileMessage}} packets are sent before {{ReplicationStartSyncMessage}} packets.
> Incorrect ordering of replication packets may happen because of {{useExecutor}} parameter in the {{sendReplicatePacket}} method. {{ReplicationStartSyncMessage}} packets are sent as first, but they are sent with {{useExecutor=true}}. Although {{ReplicationSyncFileMessage}} packets are sent after {{ReplicationStartSyncMessage}} packets, they are sent with {{useExecutor=false}}. So sending of {{ReplicationStartSyncMessage}} packets is scheduled to executor and there is no guarantee when the task will be executed, whereas {{ReplicationStartSyncMessage}} packets are sent immediately.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)