[ https://issues.apache.org/jira/browse/QPID-8569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17445323#comment-17445323 ]
Pete Fawcett commented on QPID-8569: ------------------------------------ I believe the problem is due to an error in the Queue [constructor|https://github.com/apache/qpid-cpp/blob/main/src/qpid/broker/Queue.cpp#L190] In the section beginning at [line 218|https://github.com/apache/qpid-cpp/blob/main/src/qpid/broker/Queue.cpp#L218] the ManagementAgent is informed of the new queue being created by adding a {{_qmf::Queue}} object. However, this is before the selector is created in [line 234|https://github.com/apache/qpid-cpp/blob/main/src/qpid/broker/Queue.cpp#L234] An illegal character, and some other parsing errors, cause the Selector constructor to throw an exception. The exception handling aborts the creation of the queue and returns an error to the client. However, the {{_qmf::Queue} object is never cleaned up. As a result, the ManagementAgent is out of sync with the actual broker. It shows a queue to exist, but it doesn't exist in the broker and so a {{"No such queue"}} error is returned if an attempt is made to delete it, I think the solution is to process the selector (and any other related processing that might fail) before updating the ManagementAgent I intend to submit a Pull Request to this end > Illegal selector results in undeletable queue > --------------------------------------------- > > Key: QPID-8569 > URL: https://issues.apache.org/jira/browse/QPID-8569 > Project: Qpid > Issue Type: Bug > Components: C++ Broker > Affects Versions: qpid-cpp-1.39.0 > Reporter: Pete Fawcett > Priority: Major > > Using AMQP 1.0 and creating a receiver, with an exchange as a source, and > specifying a selector. > If a valid selector is specified then, as expected, a queue is created. The > queue name and properties can be seen using {{qpid-stat}} or similar. When > the receiver is closed the queue disappears. > If an invalid selector is specified then, again as expected, an error is > returned to the client. > The problem is that it appears that a queue has been created. A new queue can > be seen using {{qpid-stat}} and, even though is shows it to be "auto-delete" > it has not been deleted. > Furthermore, trying to delete the queue using {{qpid-config}} returns a > {{"not-found: Delete failed. No such queue: ..."}} error. > I don't think all invalid selectors produce this situation, and I think that > there is some variation depending on the client being used - which perhaps > suggests some validation is being done at the client end. However, there are > certain invalid selectors that produce this error in both Python and C++ > client bindings, > Examples of invalid selector that produce errors are using an invalid > operator: > {{"header=='value'"}} which produces an {{"Illegal selector: '=': expected > literal or identifier"}} > or an invalid characters: > {{"header='\\value'"}} which produces an {{"Found illegal character"}} > both the above result in the creation of an undeletable queue > A minimal way to reproduce these errors is to use the {{selected_recv.cpp}} > example program in qpid-proton and change the filter string in [line > 65|https://github.com/apache/qpid-proton/blob/main/cpp/examples/selected_recv.cpp#L65|] -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org