Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1059784 - [amqp1.0] delete-on-close policy do not work for exchanges
Summary: [amqp1.0] delete-on-close policy do not work for exchanges
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Gordon Sim
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-30 16:14 UTC by Petr Matousek
Modified: 2019-02-08 14:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 981638 None None None Never
Red Hat Bugzilla 1073796 None None None Never

Internal Links: 981638 1073796

Description Petr Matousek 2014-01-30 16:14:20 UTC
Description of problem:

The delete-on-close lifetime policy is not applied when the exchange is in use.

Version-Release number of selected component (if applicable):
qpid-cpp-*-0.22-33

How reproducible:
100%

Steps to Reproduce:
1. declare an exchange using delete-on-close lifetime policy, do not close the link yet
2. create another consumer on that exchange, do not close the link yet (so that the exchange remain in-use when the link from 1. is closed)
3. close the link from 1.
4. list exchanges 
5. the exchange declared in 1. was not removed even if the link that declared it is already closed

Actual results:
delete-on-close lifetime policy is not applied when the exchange is in use.

Expected results:
The exchange declared with delete-on-close policy is removed when the link that declared the exchange is closed.

Additional info:

#  $cppapi/drain -t 5 --connection-options "{protocol:'amqp1.0'}" "test_ex;{create:always, node:{type: topic, properties:{lifetime-policy:delete-on-close}}}" &
[1] 1898
[root@rhel6.5-x86_64 ~/dtests/dtests]# $cppapi/drain -t 20 --connection-options "{protocol:'amqp1.0'}" test_ex &
[2] 1901
[root@rhel6.5-x86_64 ~/dtests/dtests]# 
[1]-  Done                    $cppapi/drain -t 5 --connection-options "{protocol:'amqp1.0'}" "test_ex;{create:always, node:{type: topic, properties:{lifetime-policy:delete-on-close}}}"
[root@rhel6.5-x86_64 ~/dtests/dtests]# qpid-config exchanges
Type      Exchange Name       Attributes
==================================================
...
topic     test_ex

Comment 1 Pavel Moravec 2014-03-05 13:52:24 UTC
(note to gsim: I am investigating this BZ now)

(note to myself: check if spout / qpid-send does not lead to equivalent problem)

Comment 2 Pavel Moravec 2014-03-07 10:27:46 UTC
Cancelling the consumer that created exchange with delete-on-close policy is reflected in broker by deleting the auxiliary queue, and nothing else (see "missing" OutgoingFromExchange class).

To fix this, there would have to be a mechanism how to "propagate" the information "check if we dont need to destroy this (autodelete) node when this link is closing" from the queue to the exchange - probably somewhere in OutgoingFromQueue::~OutgoingFromQueue or OutgoingFromQueue::detached.

But that would need nontrivial change while this bug is rather about consistency completeness than about a real use case..

(easier fix for very similar use case with producer creating delete-on-close posted in bz1073796)


Note You need to log in before you can comment on or make changes to this bug.