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 647948 Details for
Bug 876720
HA backup broker crashes shortly after promotion to primary
[?]
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]
Quick patch to prevent this crash
bz876720.patch (text/plain), 3.04 KB, created by
Jason Dillaman
on 2012-11-19 18:53:35 UTC
(
hide
)
Description:
Quick patch to prevent this crash
Filename:
MIME Type:
Creator:
Jason Dillaman
Created:
2012-11-19 18:53:35 UTC
Size:
3.04 KB
patch
obsolete
>diff --git a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp >index e70c81e..77864c3 100644 >--- a/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp >+++ b/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp >@@ -201,17 +201,17 @@ class BrokerReplicator::ErrorListener : public SessionHandler::ErrorListener { > class BrokerReplicator::ConnectionObserver : public broker::ConnectionObserver > { > public: >- ConnectionObserver(BrokerReplicator& br) : brokerReplicator(br) {} >+ ConnectionObserver(boost::shared_ptr<BrokerReplicator> br) : brokerReplicator(br) {} > virtual void connection(Connection&) {} > virtual void opened(Connection&) {} > > virtual void closed(Connection& c) { >- if (brokerReplicator.link && &c == brokerReplicator.connection) >- brokerReplicator.disconnected(); >+ if (brokerReplicator->link && &c == brokerReplicator->connection) >+ brokerReplicator->disconnected(); > } > virtual void forced(Connection& c, const std::string& /*message*/) { closed(c); } > private: >- BrokerReplicator& brokerReplicator; >+ boost::shared_ptr<BrokerReplicator> brokerReplicator; > }; > > /** Keep track of queues or exchanges during the update process to solve 2 >@@ -281,8 +281,6 @@ BrokerReplicator::BrokerReplicator(HaBroker& hb, const boost::shared_ptr<Link>& > alternates(hb.getBroker().getExchanges()), > connection(0) > { >- broker.getConnectionObservers().add( >- boost::shared_ptr<broker::ConnectionObserver>(new ConnectionObserver(*this))); > framing::FieldTable args = getArgs(); > args.setString(QPID_REPLICATE, printable(NONE).str()); > setArgs(args); >@@ -299,6 +297,9 @@ BrokerReplicator::BrokerReplicator(HaBroker& hb, const boost::shared_ptr<Link>& > > void BrokerReplicator::initialize() { > // Can't do this in the constructor because we need a shared_ptr to this. >+ connectionObserver.reset(new ConnectionObserver(shared_from_this())); >+ broker.getConnectionObservers().add(connectionObserver); >+ > types::Uuid uuid(true); > const std::string name(QPID_CONFIGURATION_REPLICATOR + ".bridge." + uuid.str()); > std::pair<Bridge::shared_ptr, bool> result = broker.getLinks().declare( >@@ -333,7 +334,9 @@ void collectQueueReplicators( > } > } // namespace > >-void BrokerReplicator::shutdown() {} >+void BrokerReplicator::shutdown() { >+ broker.getConnectionObservers().remove(connectionObserver); >+} > > // This is called in the connection IO thread when the bridge is started. > void BrokerReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHandler) { >diff --git a/qpid/cpp/src/qpid/ha/BrokerReplicator.h b/qpid/cpp/src/qpid/ha/BrokerReplicator.h >index 7136f32..723c4fe 100644 >--- a/qpid/cpp/src/qpid/ha/BrokerReplicator.h >+++ b/qpid/cpp/src/qpid/ha/BrokerReplicator.h >@@ -149,6 +149,7 @@ class BrokerReplicator : public broker::Exchange, > EventDispatchMap dispatch; > std::auto_ptr<UpdateTracker> queueTracker; > std::auto_ptr<UpdateTracker> exchangeTracker; >+ boost::shared_ptr<ConnectionObserver> connectionObserver; > }; > }} // namespace qpid::broker >
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 876720
:
647948
|
647949