Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 871797 Details for
Bug 1073796
[amqp1.0] delete-on-close policy do not work for producers of exchanges
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch proposal
bz1073796.patch (text/plain), 3.62 KB, created by
Pavel Moravec
on 2014-03-07 08:53:08 UTC
(
hide
)
Description:
Patch proposal
Filename:
MIME Type:
Creator:
Pavel Moravec
Created:
2014-03-07 08:53:08 UTC
Size:
3.62 KB
patch
obsolete
>Index: cpp/src/qpid/broker/Exchange.cpp >=================================================================== >--- cpp/src/qpid/broker/Exchange.cpp (revision 1574030) >+++ cpp/src/qpid/broker/Exchange.cpp (working copy) >@@ -444,12 +444,16 @@ > Mutex::ScopedLock l(usersLock); > otherUsers++; > } >-void Exchange::decOtherUsers() >+void Exchange::decOtherUsers(bool isControllingLink=false) > { > Mutex::ScopedLock l(usersLock); > assert(otherUsers); > if (otherUsers) otherUsers--; >- if (!inUse() && !hasBindings()) checkAutodelete(); >+ if (isControllingLink && autodelete) { >+ broker->getExchanges().destroy(name); >+ } >+ else if (!inUse() && !hasBindings()) >+ checkAutodelete(); > } > bool Exchange::inUse() const > { >Index: cpp/src/qpid/broker/Exchange.h >=================================================================== >--- cpp/src/qpid/broker/Exchange.h (revision 1574030) >+++ cpp/src/qpid/broker/Exchange.h (working copy) >@@ -192,7 +192,7 @@ > QPID_BROKER_EXTERN bool inUseAsAlternate(); > > QPID_BROKER_EXTERN void incOtherUsers(); >- QPID_BROKER_EXTERN void decOtherUsers(); >+ QPID_BROKER_EXTERN void decOtherUsers(bool isControllingLink); > QPID_BROKER_EXTERN bool inUse() const; > > virtual std::string getType() const = 0; >Index: cpp/src/qpid/broker/amqp/Session.cpp >=================================================================== >--- cpp/src/qpid/broker/amqp/Session.cpp (revision 1574030) >+++ cpp/src/qpid/broker/amqp/Session.cpp (working copy) >@@ -185,19 +185,20 @@ > class IncomingToExchange : public DecodingIncoming > { > public: >- IncomingToExchange(Broker& b, Session& p, boost::shared_ptr<qpid::broker::Exchange> e, pn_link_t* l, const std::string& source) >- : DecodingIncoming(l, b, p, source, e->getName(), pn_link_name(l)), exchange(e), authorise(p.getAuthorise()) >+ IncomingToExchange(Broker& b, Session& p, boost::shared_ptr<qpid::broker::Exchange> e, pn_link_t* l, const std::string& source, bool icl) >+ : DecodingIncoming(l, b, p, source, e->getName(), pn_link_name(l)), exchange(e), authorise(p.getAuthorise()), isControllingLink(icl) > { > exchange->incOtherUsers(); > } > ~IncomingToExchange() > { >- exchange->decOtherUsers(); >+ exchange->decOtherUsers(isControllingLink); > } > void handle(qpid::broker::Message& m); > private: > boost::shared_ptr<qpid::broker::Exchange> exchange; > Authorise& authorise; >+ bool isControllingLink; > }; > > Session::Session(pn_session_t* s, Connection& c, qpid::sys::OutputControl& o) >@@ -425,7 +426,7 @@ > boost::shared_ptr<Incoming> q(new IncomingToQueue(connection.getBroker(), *this, node.queue, link, source, node.created && node.properties.trackControllingLink())); > incoming[link] = q; > } else if (node.exchange) { >- boost::shared_ptr<Incoming> e(new IncomingToExchange(connection.getBroker(), *this, node.exchange, link, source)); >+ boost::shared_ptr<Incoming> e(new IncomingToExchange(connection.getBroker(), *this, node.exchange, link, source, node.created && node.properties.trackControllingLink())); > incoming[link] = e; > } else if (node.relay) { > boost::shared_ptr<Incoming> in(new IncomingToRelay(link, connection.getBroker(), *this, source, name, pn_link_name(link), node.relay)); >@@ -717,6 +718,8 @@ > > void IncomingToExchange::handle(qpid::broker::Message& message) > { >+ if (exchange->isDestroyed()) >+ throw qpid::framing::ResourceDeletedException(QPID_MSG("Exchange " << exchange->getName() << " has been deleted.")); > authorise.route(exchange, message); > DeliverableMessage deliverable(message, 0); > exchange->route(deliverable);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1073796
: 871797