Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-3766

Mirror is not using AckReason to perform similar operations on the target mirror

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.21.0
    • 2.24.0
    • None
    • None

    Description

      When dual mirroring is in play there is a race condition which can result in missing or duplicate messages on the brokers.

       

      Scenario 1:

      1. Bring up two artemis instances with broker-connection mirroring between each other. (A and B)
      2. Send a message to A with a short TTL (I used 30 seconds in my test)
      3. After the message mirrors but before it expires, pause the Mirror queue on both sides
      4. Wait for the message to expire, and the reaper thread to pick it up
      5. Observe that on both sides the message has moved to the ExpiryQueue. In the Mirror queue there are 2 messages on A (a message destined to the ExpiryQueue and an ack on the original message). On B there is a single message in the mirror, which is the message to the expiry queue.
      6. Resume the mirror, I'm not sure the order matters, but I did B and then A.
      7. Observe that on A there is a single message in the ExpiryQueue, but on B there are now 2 messages in the expiry queue.

      Scenario 2:

      1. Bring up two artemis instances with broker-connection mirroring between each other. (A and B). On A disable the reaper thread by setting `<message-expiry-scan-period>-1</message-expiry-scan-period>`
      2. Send a message to A with a short TTL
      3. Wait for the TTL to expire
      4. On B the message moves to the ExpiryQueue, on A the message ends disappears (no longer in the ExpiryQueue nor the original queue)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sebaker Stephen Baker
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment