Bug 873465 - Dynamic and static federation should not attempt to declare an existing queue
Summary: Dynamic and static federation should not attempt to declare an existing queue
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: 2.3
: ---
Assignee: Chuck Rolke
QA Contact: Leonid Zhaldybin
URL:
Whiteboard:
Depends On:
Blocks: 698367
TreeView+ depends on / blocked
 
Reported: 2012-11-05 22:55 UTC by Jason Dillaman
Modified: 2014-11-09 22:38 UTC (History)
5 users (show)

Fixed In Version: qpid-cpp-0.18-9
Doc Type: Bug Fix
Doc Text:
Cause: If a queue name is provided during the creation of a federated link then the destination broker may declare the queue if it does not exist. Consequence: There is a race condition during a broker restart. A link request may be received before the queue in question has been recovered. If the queue is recovered through normal broker configuration then it may have various non-default properties. However if the queue is created through the link request then the queue will be created with default properties and the subsequent queue recovery operation will fail. Fix: Do not create queues that are named in federated link requests. Result: During restart. as resources are being recreated, the destination broker will eventually create the queue with the correct properties. Federation link requests that happen before the queue is created will fail but after the queue is created then the retried link requests will succeed and the destination queue will have the correct properties.
Clone Of:
Environment:
Last Closed: 2013-03-19 16:37:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Quick patch to avoid declaring an existing queue (2.84 KB, patch)
2012-11-05 23:02 UTC, Jason Dillaman
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA QPID-4423 0 None None None 2012-11-06 19:48:57 UTC

Description Jason Dillaman 2012-11-05 22:55:49 UTC
Description of problem:
When configuring either a dynamic or static federated link, it is possible to provide the name of an existing queue to utilize.  The destination broker of the federated route will attempt to declare the queue regardless of whether or not it should be using an existing queue.  This can result in a race condition if the pre-existing queue is not yet available on the source broker, so the destination broker creates a queue with default queue settings (i.e. trace/exclude, reject policy, default size limits). If a queue name was provided, the broker should not attempt to declare the queue.

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

How reproducible:
100%

Steps to Reproduce:
1. Create a dynamic or static federation route, providing a queue name
  
Actual results:
The queue is declared on the source broker.

Expected results:
The queue should be be declared on the source broker.

Additional info:

Comment 1 Jason Dillaman 2012-11-05 23:02:37 UTC
Created attachment 638952 [details]
Quick patch to avoid declaring an existing queue

Comment 2 Chuck Rolke 2012-11-06 19:48:57 UTC
Patch for review at:
https://reviews.apache.org/r/7901/

Comment 3 Chuck Rolke 2012-11-07 20:26:49 UTC
Reviewers Conway and Ross need to understand better what the underlying problem is. Can you describe in more detail the use case that the patch fixes?

Comment 4 Chuck Rolke 2012-11-07 21:14:54 UTC
Fixed upstream at r1406809

Comment 7 Leonid Zhaldybin 2013-01-28 16:11:01 UTC
Tested on RHEL5.9 and RHEL6.4. This issue has been fixed.

Packages used for testing:

qpid-cpp-0.18-14

-> VERIFIED


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