qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1561833 - in /qpid/trunk/qpid/cpp/src/qpid/ha: Backup.cpp BrokerReplicator.cpp HaBroker.cpp HaPlugin.cpp Primary.cpp QueueReplicator.cpp
Date Mon, 27 Jan 2014 20:35:02 GMT
Author: aconway
Date: Mon Jan 27 20:35:02 2014
New Revision: 1561833

URL: http://svn.apache.org/r1561833
Log:
NO-JIRA: Minor rationalization of log statement priorities.

Demote "backup of queue x connected to y" from info to debug.
Tighten up redundant 'notice' messages around promotion of primary.
Promote 'DTX not implemented' to warning
Misc. other minor adjustments.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/ha/Backup.cpp
    qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
    qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp
    qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp
    qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp
    qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/Backup.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/Backup.cpp?rev=1561833&r1=1561832&r2=1561833&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/Backup.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/Backup.cpp Mon Jan 27 20:35:02 2014
@@ -94,7 +94,6 @@ Role* Backup::recover(Mutex::ScopedLock&
         Mutex::ScopedLock l(lock);
         if (stopped) return 0;
         stop(l);                 // Stop backup activity before starting primary.
-        QPID_LOG(notice, "Promoting to primary: " << haBroker.getBrokerInfo());
         // Reset membership before allowing backups to connect.
         backups = membership.otherBackups();
         membership.clear();

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp?rev=1561833&r1=1561832&r2=1561833&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp Mon Jan 27 20:35:02 2014
@@ -256,7 +256,7 @@ class BrokerReplicator::UpdateTracker {
 
   private:
     void clean(const std::string& name) {
-        QPID_LOG(info, "Backup: Deleted " << type << " " << name <<
+        QPID_LOG(debug, "Backup: Deleted " << type << " " << name <<
                  ": no longer exists on primary");
         try { cleanFn(name); }
         catch (const framing::NotFoundException&) {}
@@ -369,7 +369,7 @@ void BrokerReplicator::connected(Bridge&
     link->getRemoteAddress(primary);
     string queueName = bridge.getQueueName();
 
-    QPID_LOG(info, logPrefix << (initialized ? "Failing over" : "Connecting")
+    QPID_LOG(notice, logPrefix << (initialized ? "Failing over" : "Connecting")
              << " to primary " << primary
              << " status:" << printable(haBroker.getStatus()));
     initialized = true;

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp?rev=1561833&r1=1561832&r2=1561833&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp Mon Jan 27 20:35:02 2014
@@ -108,7 +108,7 @@ bool isNone(const std::string& x) { retu
 void HaBroker::initialize() {
     if (settings.cluster) {
         membership.setStatus(JOINING);
-        QPID_LOG(notice, "Initializing HA broker: " << membership.getSelf());
+        QPID_LOG(info, "Initializing HA broker: " << membership.getSelf());
     }
 
     // Set up the management object.

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp?rev=1561833&r1=1561832&r2=1561833&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/HaPlugin.cpp Mon Jan 27 20:35:02 2014
@@ -72,7 +72,7 @@ struct HaPlugin : public Plugin {
         broker::Broker* broker = dynamic_cast<broker::Broker*>(&target);
         if (broker && (settings.cluster || settings.queueReplication)) {
             if (!broker->getManagementAgent()) {
-                QPID_LOG(info, "HA plugin disabled because management is disabled");
+                QPID_LOG(warning, "HA plugin disabled because management is disabled");
                 if (settings.cluster)
                     throw Exception("Cannot start HA: management is disabled");
             } else {

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp?rev=1561833&r1=1561832&r2=1561833&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/Primary.cpp Mon Jan 27 20:35:02 2014
@@ -105,14 +105,12 @@ Primary::Primary(HaBroker& hb, const Bro
     QueueReplicator::copy(hb.getBroker().getExchanges(), qrs);
     std::for_each(qrs.begin(), qrs.end(), boost::bind(&QueueReplicator::promoted, _1));
 
-    if (expect.empty()) {
-        QPID_LOG(notice, logPrefix << "Promoted to primary. No expected backups.");
-    }
-    else {
+    if (!expect.empty()) {
         // NOTE: RemoteBackups must be created before we set the BrokerObserver
         // or ConnectionObserver so that there is no client activity while
         // the QueueGuards are created.
-        QPID_LOG(notice, logPrefix << "Promoted to primary. Expected backups: " <<
expect);
+        QPID_LOG(notice, logPrefix << "Promoted and recovering, waiting for backups:
"
+                 << expect);
         for (BrokerInfo::Set::const_iterator i = expect.begin(); i != expect.end(); ++i)
{
             boost::shared_ptr<RemoteBackup> backup(new RemoteBackup(*i, 0));
             backups[i->getSystemId()] = backup;
@@ -147,7 +145,7 @@ void Primary::checkReady() {
             activate = active = true;
     }
     if (activate) {
-        QPID_LOG(notice, logPrefix << "Finished waiting for backups, primary is active.");
+        QPID_LOG(notice, logPrefix << "Promoted and active.");
         membership.setStatus(ACTIVE); // Outside of lock.
     }
 }
@@ -419,7 +417,7 @@ void Primary::startTx(const boost::intru
 }
 
 void Primary::startDtx(const boost::intrusive_ptr<broker::DtxBuffer>& ) {
-    QPID_LOG(notice, "DTX transactions in a HA cluster are not yet atomic");
+    QPID_LOG(warning, "DTX transactions in a HA cluster are not yet atomic");
 }
 
 }} // namespace qpid::ha

Modified: qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp?rev=1561833&r1=1561832&r2=1561833&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp Mon Jan 27 20:35:02 2014
@@ -240,7 +240,7 @@ void QueueReplicator::initializeBridge(B
     }
     qpid::Address primary;
     link->getRemoteAddress(primary);
-    QPID_LOG(info, logPrefix << "Connected to " << primary << "(" <<
bridgeName << ")");
+    QPID_LOG(debug, logPrefix << "Connected to " << primary << "(" <<
bridgeName << ")");
     QPID_LOG(trace, logPrefix << "Subscription arguments: " << arguments);
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message