Author: aconway
Date: Thu Jun 28 14:20:25 2012
New Revision: 1355018

URL: http://svn.apache.org/viewvc?rev=1355018&view=rev
Log:
NO-JIRA: Get rid of noisy errors from rejected connections.

A HA backup broker used to reject client connections by throwing out of
ConnectionObserver:opened.  This is not an error, but generates a lot of noise
in the form of error log messages.  This patch calls Connection::abort() instead
of throwing, which does not leave any error log messages.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h
    qpid/trunk/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h?rev=1355018&r1=1355017&r2=1355018&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/BackupConnectionExcluder.h Thu Jun 28 
14:20:25 2012
@@ -36,9 +36,8 @@ class BackupConnectionExcluder : public 
 {
   public:
     void opened(broker::Connection& connection) {
-        // FIXME aconway 2012-06-13: suppress caught error message, make this 
an info message.
-        QPID_LOG(error, "Backup broker rejected connection 
"+connection.getMgmtId());
-        throw Exception("Backup broker rejected connection 
"+connection.getMgmtId());
+        QPID_LOG(debug, "Backup broker rejected connection 
"+connection.getMgmtId());
+        connection.abort();
     }
 
     void closed(broker::Connection&) {}

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp?rev=1355018&r1=1355017&r2=1355018&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/ConnectionObserver.cpp Thu Jun 28 14:20:25 
2012
@@ -61,9 +61,8 @@ void ConnectionObserver::opened(broker::
     BrokerInfo info;            // Avoid self connections.
     if (getBrokerInfo(connection, info)) {
         if (info.getSystemId() == self) {
-            // FIXME aconway 2012-06-13: suppress caught error message, make 
this an info message.
-            QPID_LOG(error, "HA broker rejected self connection 
"+connection.getMgmtId());
-            throw Exception("HA broker rejected self connection 
"+connection.getMgmtId());
+            QPID_LOG(debug, "HA broker rejected self connection 
"+connection.getMgmtId());
+            connection.abort();
         }
 
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to