[rhmessaging-commits] rhmessaging commits: r2146 - in store/trunk/cpp: tests/jrnl/jtt and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Tue Jun 10 10:30:38 EDT 2008
Author: kpvdr
Date: 2008-06-10 10:30:38 -0400 (Tue, 10 Jun 2008)
New Revision: 2146
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
store/trunk/cpp/tests/jrnl/jtt/Makefile.am
store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp
Log:
Added helpful message for DB_VERSION_MISMATCH error when opening bdb database. See BZ448587: "Unable to start rhm on F8". Also solved last test directory issue
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2008-06-10 11:25:32 UTC (rev 2145)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2008-06-10 14:30:38 UTC (rev 2146)
@@ -136,6 +136,10 @@
try {
env.open(bdbdir.c_str(), DB_THREAD | DB_CREATE | DB_INIT_TXN | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_USE_ENVIRON, 0);
} catch (const DbException& e) {
+ if (e.get_errno() == DB_VERSION_MISMATCH)
+ THROW_STORE_EXCEPTION_2("Database environment mismatch: This version of bd4 does not match that which created the store database. "
+ "(If recovery is not important, delete the contents of the store directory. Otherwise, try upgrading the database using "
+ "db_upgrade or using db_recover - but the db4-utils package must also be installed to use these utilities.)", e);
THROW_STORE_EXCEPTION_2("Error opening environment", e);
}
Modified: store/trunk/cpp/tests/jrnl/jtt/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-06-10 11:25:32 UTC (rev 2145)
+++ store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-06-10 14:30:38 UTC (rev 2146)
@@ -31,6 +31,7 @@
TESTS_ENVIRONMENT = \
VALGRIND=$(VALGRIND) \
abs_srcdir=$(abs_srcdir) \
+ TMPDIR=$(TMPDIR) \
$(srcdir)/../../run_test
all-local: .valgrindrc .valgrind.supp
Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp 2008-06-10 11:25:32 UTC (rev 2145)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp 2008-06-10 14:30:38 UTC (rev 2146)
@@ -38,7 +38,7 @@
const string test_filename("_ut_jrnl_instance");
const char* tdp = getenv("TMPDIR");
-const string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/OrderingTest");
+const string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/JttTest");
QPID_AUTO_TEST_CASE(constructor_1)
{
More information about the rhmessaging-commits
mailing list