cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated --------------------------------------------------------------------------------------------
Key: QPID-3215 URL: https://issues.apache.org/jira/browse/QPID-3215 Project: Qpid Issue Type: Bug Components: C++ Broker, C++ Clustering Affects Versions: 0.10 Reporter: Alan Conway Assignee: Alan Conway Fix For: 0.11 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. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org