Bug 1051453 - [amqp1.0] delete-if-unused lifetime policy not applied after the sender's link is closed
Summary: [amqp1.0] delete-if-unused lifetime policy not applied after the sender's lin...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 3.0
: ---
Assignee: Gordon Sim
QA Contact: Petr Matousek
URL:
Whiteboard:
Depends On:
Blocks: 1010399
TreeView+ depends on / blocked
 
Reported: 2014-01-10 10:16 UTC by Petr Matousek
Modified: 2015-01-21 12:57 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-0.22-33
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-5468 0 None None None Never
Red Hat Bugzilla 981638 0 medium CLOSED support standard lifetime policies for AMQP 1.0 2021-02-22 00:41:40 UTC

Internal Links: 981638

Description Petr Matousek 2014-01-10 10:16:18 UTC
Description of problem:

The node declared using 'delete-if-unused' lifetime policy shall be removed if there remain no links for which the node is either the source or target. 

Following example violates this rule:

./spout --connection-options "{protocol: 'amqp1.0'}" "#MyQ;{node:{properties:{lifetime-policy:delete-if-unused}}}"

Even there is a message on the queue, there is no link an thus the queue shall be deleted.

Note: This may also happen on existing queue, ie:

# drain -t 5 -c 1 --connection-options "{protocol: 'amqp1.0'}" "MyName2;{create:always, node:{properties:{lifetime-policy:delete-if-unused}}}" &
# ./qc2_spout --connection-options "{protocol: 'amqp1.0'}" -c 2 --duration 6 "MyName2"

after both the drain and the spout ends the queue remain existing

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

How reproducible:
100%

Steps to Reproduce:
1. ./spout --connection-options "{protocol: 'amqp1.0'}" "#MyQ;{node:{properties:{lifetime-policy:delete-if-unused}}}"
2. queue was not removed

Actual results:
The node defined with 'delete-if-unused' policy is not removed after all the links are closed

Expected results:
Node removed after all the incoming/outgoing links are closed

Additional info:

# ./spout --connection-options "{protocol: 'amqp1.0'}" "#MyQ;{node:{properties:{lifetime-policy:delete-if-unused}}}"
# qpid-stat -q
Queues
  queue                                                                                                               dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  ===================================================================================================================================================================================================
  1a72dc75-dc8b-4619-9cb4-be9e561741fe_95ff371f-288a-4055-87fa-62cf31d18aaf#MyQ_aa745925-0fcf-43de-8cff-80a53348f85f       Y                 1     1      0      65     65        0         0     1
  db0132df-6aad-4bec-be7b-7ed3494da00f:0.0                                                                                 Y        Y        0     0      0       0      0        0         1     2


# service qpidd restart
Stopping Qpid AMQP daemon:                                 [  OK  ]
Starting Qpid AMQP daemon:                                 [  OK  ]

# $cppapi/drain -t 5 -c 1 --connection-options "{protocol: 'amqp1.0'}" "MyName2;{create:always, node:{properties:{lifetime-policy:delete-if-unused}}}" &
[1] 18585
# ./qc2_spout --connection-options "{protocol: 'amqp1.0'}" -c 2 --duration 6 "MyName2" &
[2] 18586
Message(properties={spout-id:9ecced48-10a4-40b9-a7f9-9bad1cf750cf:0}, content='')
# qpid-stat -q
Queues
  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =========================================================================================================================
  MyName2                                        Y                 0     1      1       0     65       65         0     1
  d9438806-7746-4629-ad8f-7b6d5e1ae9a0:0.0       Y        Y        0     0      0       0      0        0         1     2
[1]-  Done                    $cppapi/drain -t 5 -c 1 --connection-options "{protocol: 'amqp1.0'}" "MyName2;{create:always, node:{properties:{lifetime-policy:delete-if-unused}}}"
# sleep 6
[2]+  Done                    ./qc2_spout --connection-options "{protocol: 'amqp1.0'}" -c 2 --duration 6 "MyName2"
# qpid-stat -q
Queues
  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =========================================================================================================================
  2ac4159b-70d3-4d6b-b1d6-6c05077356e9:0.0       Y        Y        0     0      0       0      0        0         1     2
  MyName2                                        Y                 1     2      1      65    130       65         0     1

Comment 1 Gordon Sim 2014-01-10 23:30:19 UTC
Fixed upstream: https://svn.apache.org/r1557279

Comment 2 Petr Matousek 2014-01-16 14:21:36 UTC
This issue has been fixed. Verified on rhel6.5 (x86_64, i386).

packages under test:
qpid-cpp-*-0.22-33

-> VERIFIED


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