You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2011/02/01 22:25:36 UTC
svn commit: r1066215 - /qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
Author: aconway
Date: Tue Feb 1 21:25:35 2011
New Revision: 1066215
URL: http://svn.apache.org/viewvc?rev=1066215&view=rev
Log:
QPID-3007: Don't record management statistics in cluster-unsafe contexts.
A few frames are sent in cluster-unsafe contexts, e.g. heartbeat timer
callbacks and during initial connection negotiation. Don't update the
connection's management counters in these contexts to avoid
inconsistent management data in a cluster. There are very few such
frames so this does not unduly distort the management data.
Modified:
qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp?rev=1066215&r1=1066214&r2=1066215&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp Tue Feb 1 21:25:35 2011
@@ -184,7 +184,8 @@ bool isMessage(const AMQMethodBody* meth
void Connection::recordFromServer(const framing::AMQFrame& frame)
{
- if (mgmtObject != 0)
+ // Don't record management stats in cluster-unsafe contexts
+ if (mgmtObject != 0 && isClusterSafe())
{
mgmtObject->inc_framesToClient();
mgmtObject->inc_bytesToClient(frame.encodedSize());
@@ -196,7 +197,8 @@ void Connection::recordFromServer(const
void Connection::recordFromClient(const framing::AMQFrame& frame)
{
- if (mgmtObject != 0)
+ // Don't record management stats in cluster-unsafe contexts
+ if (mgmtObject != 0 && isClusterSafe())
{
mgmtObject->inc_framesFromClient();
mgmtObject->inc_bytesFromClient(frame.encodedSize());
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org