diff options
| author | Alan Conway <aconway@apache.org> | 2012-10-15 21:35:38 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2012-10-15 21:35:38 +0000 |
| commit | 52f22489357f604aa8d5e6615f2dfe4a06eadf0c (patch) | |
| tree | bf9088c46d4b2c7b1eecaaed9af26fd8d9c7b669 /cpp/src/qpid/broker/SemanticState.cpp | |
| parent | ebbc85c99d48c5a2b5cbd5163b15f3a88c964303 (diff) | |
| download | qpid-python-52f22489357f604aa8d5e6615f2dfe4a06eadf0c.tar.gz | |
MQPID-4286: QMF queries for HA replication take too long to process (Jason Dillaman)
Rework ManagementAgent locks, get rid of shared buffers that were points of contention.
Minor log message improvements in ha code.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1398530 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SemanticState.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SemanticState.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp index 65530394a3..f3d97dc078 100644 --- a/cpp/src/qpid/broker/SemanticState.cpp +++ b/cpp/src/qpid/broker/SemanticState.cpp @@ -300,8 +300,7 @@ Consumer(_name, type), arguments(_arguments), notifyEnabled(true), syncFrequency(_arguments.getAsInt(QPID_SYNC_FREQUENCY)), - deliveryCount(0), - mgmtObject(0) + deliveryCount(0) { if (parent != 0 && queue.get() != 0 && queue->GetManagementObject() !=0) { @@ -310,17 +309,17 @@ Consumer(_name, type), if (agent != 0) { - mgmtObject = new _qmf::Subscription(agent, this, ms , queue->GetManagementObject()->getObjectId(), getTag(), - !acquire, ackExpected, exclusive, ManagementAgent::toMap(arguments)); + mgmtObject = _qmf::Subscription::shared_ptr(new _qmf::Subscription(agent, this, ms , queue->GetManagementObject()->getObjectId(), getTag(), + !acquire, ackExpected, exclusive, ManagementAgent::toMap(arguments))); agent->addObject (mgmtObject); mgmtObject->set_creditMode("WINDOW"); } } } -ManagementObject* SemanticState::ConsumerImpl::GetManagementObject (void) const +ManagementObject::shared_ptr SemanticState::ConsumerImpl::GetManagementObject (void) const { - return (ManagementObject*) mgmtObject; + return mgmtObject; } Manageable::status_t SemanticState::ConsumerImpl::ManagementMethod (uint32_t methodId, Args&, string&) |
