Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-3215

cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.10
    • 0.11
    • C++ Broker, C++ Clustering
    • None

    Description

      Description of problem:

      SemanticState::route() uses a simple cache variable to avoid looking up the
      exchange for every message. However if the exchange in question is deleted,
      even if then recreated, this can cause inconsistencies in a cluster.

      Version-Release number of selected component (if applicable):

      1.3

      How reproducible:

      100% (Quite a contrived example though)

      Steps to Reproduce:
      1. start one cluster node
      2. create an exchange, a queue and a binding between them

      qpid-config add exchange topic x
      qpid-config add queue q
      qpid-config bind x q k

      3. start a session and send a message to the exchange with the relevant key
      (leave session running)

      qpid-send --content-stdin --address x/k

      then enter a few lines to send some messages

      4. start a new cluster node
      5. delete and recreate the exchange, this time add in a different binding

      qpid-config del exchange x
      qpid-config add exchange topic x
      qpid-config add queue q2
      qpid-config bind x q2 k

      6. send some more messages on the session from 3. with same exchange and key
      (i.e. type in some more messages if using qpid-send as suggested)

      now have an inconsistency where the second node has some messages in q2 and
      some (though fewer than first node) in q1, whereas for first node all the
      messages are in q1

      7. qpid-receive --address 'q2;

      {mode: browse}

      ' --broker localhost:5673
      --capacity 1 (assuming second node is 5673)

      Actual results:

      First node shutsdown with inconsistent error

      Expected results:

      No inconsistency, should be able to run the command in 7 against q or q2 on
      either node and see the same results.

      Attachments

        Activity

          People

            aconway Alan Conway
            aconway Alan Conway
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: