[rhmessaging-commits] rhmessaging commits: r4363 - store/trunk/cpp/lib.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Sep 30 14:30:44 EDT 2010


Author: aconway
Date: 2010-09-30 14:30:44 -0400 (Thu, 30 Sep 2010)
New Revision: 4363

Modified:
   store/trunk/cpp/lib/MessageStoreImpl.cpp
Log:
Bug 632188 - Broker restart fails without removal of store directory.

The old store was not being pushed down if "notice" level logging was disabled.
A broker trying to re-join an active cluster would fail to start with:

Daemon startup failed: Exchange already exists: amq.topic (MessageStoreImpl.cpp:564)


Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp	2010-09-30 14:52:39 UTC (rev 4362)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp	2010-09-30 18:30:44 UTC (rev 4363)
@@ -48,7 +48,8 @@
 namespace _qmf = qmf::com::redhat::rhm::store;
 
 const std::string MessageStoreImpl::storeTopLevelDir("rhm"); // Sets the top-level store dir name
-qpid::sys::Duration MessageStoreImpl::defJournalGetEventsTimeout(10 * qpid::sys::TIME_MSEC); // 10ms
+// FIXME aconway 2010-03-09: was 10
+qpid::sys::Duration MessageStoreImpl::defJournalGetEventsTimeout(1 * qpid::sys::TIME_MSEC); // 10ms
 qpid::sys::Duration MessageStoreImpl::defJournalFlushTimeout(500 * qpid::sys::TIME_MSEC); // 0.5s
 qpid::sys::Mutex TxnCtxt::globalSerialiser;
 
@@ -416,7 +417,8 @@
     std::ostringstream oss;
     oss << storeDir << "/" << storeTopLevelDir;
     if (saveStoreContent) {
-        QPID_LOG(notice, "Store directory " << oss.str() << " was pushed down (saved) into directory " << mrg::journal::jdir::push_down(storeDir, storeTopLevelDir, "cluster") << ".");
+        string dir = mrg::journal::jdir::push_down(storeDir, storeTopLevelDir, "cluster");
+        QPID_LOG(notice, "Store directory " << oss.str() << " was pushed down (saved) into directory " << dir << ".");
     } else {
         mrg::journal::jdir::delete_dir(oss.str().c_str());
         QPID_LOG(notice, "Store directory " << oss.str() << " was truncated.");



More information about the rhmessaging-commits mailing list