[rhmessaging-commits] rhmessaging commits: r1656 - in store/trunk/cpp: tests and 1 other directories.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu Feb 7 10:01:51 EST 2008
Author: tedross
Date: 2008-02-07 10:01:51 -0500 (Thu, 07 Feb 2008)
New Revision: 1656
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
store/trunk/cpp/lib/StorePlugin.cpp
store/trunk/cpp/tests/jrnl/jtt/Makefile.am
store/trunk/cpp/tests/system_test.sh
Log:
Added support for qpidd --data-dir function. Made async store the default. Fixed F8 compile problem in jtt unit tests
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2008-02-07 13:22:19 UTC (rev 1655)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2008-02-07 15:01:51 UTC (rev 1656)
@@ -1361,15 +1361,14 @@
BdbMessageStore::Options::Options(const std::string& name) :
qpid::Options(name),
- storeDir("/var"),
- storeAsync(false),
+ storeAsync(true),
storeForce(false),
numJrnlFiles(8),
jrnlFsizePgs(24)
{
addOptions()
("store-directory", qpid::optValue(storeDir,"DIR"),
- "Store directory location for persistence.")
+ "Store directory location for persistence (overrides --data-dir)")
("store-async", qpid::optValue(storeAsync,"yes|no"),
"Use async persistence storage - if store supports it, enables AIO O_DIRECT.")
("store-force", qpid::optValue(storeForce,"yes|no"),
Modified: store/trunk/cpp/lib/StorePlugin.cpp
===================================================================
--- store/trunk/cpp/lib/StorePlugin.cpp 2008-02-07 13:22:19 UTC (rev 1655)
+++ store/trunk/cpp/lib/StorePlugin.cpp 2008-02-07 15:01:51 UTC (rev 1656)
@@ -24,6 +24,7 @@
#include "qpid/broker/Broker.h"
#include "qpid/Plugin.h"
#include "qpid/Options.h"
+#include "qpid/DataDir.h"
#include "BdbMessageStore.h"
@@ -42,7 +43,16 @@
{
Broker* broker = dynamic_cast<Broker*>(&target);
MessageStore *store = new rhm::bdbstore::BdbMessageStore ();
+ DataDir& dataDir = broker->getDataDir ();
+ if (options.storeDir.empty ())
+ {
+ if (!dataDir.isEnabled ())
+ throw Exception ("If --data-dir is blank, --store-directory must be set");
+
+ options.storeDir = dataDir.getPath ();
+ }
+
if (!store->init (&options))
{
throw Exception("Existing Journal in different mode, backup/move existing data "
Modified: store/trunk/cpp/tests/jrnl/jtt/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-02-07 13:22:19 UTC (rev 1655)
+++ store/trunk/cpp/tests/jrnl/jtt/Makefile.am 2008-02-07 15:01:51 UTC (rev 1656)
@@ -24,7 +24,7 @@
LIBOBJDIR = ${LIBDIR}/.libs
JRNLDIR = ${LIBDIR}/jrnl
-AM_CXXFLAGS = -I${LIBDIR} -Wall -Werror -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -pedantic -pthread
+AM_CXXFLAGS = -I${LIBDIR} -Wall -Werror -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -pedantic -pthread -DBOOST_TEST_DYN_LINK
TESTS = \
_ut_data_src \
Modified: store/trunk/cpp/tests/system_test.sh
===================================================================
--- store/trunk/cpp/tests/system_test.sh 2008-02-07 13:22:19 UTC (rev 1655)
+++ store/trunk/cpp/tests/system_test.sh 2008-02-07 15:01:51 UTC (rev 1656)
@@ -64,18 +64,18 @@
while ((sync <= 1)); do
echo
if ((sync == 1)); then
- JRNLFLAGS="--store-directory ${WORKING_DIR} --store-async yes --store-force yes"
+ JRNLFLAGS="--store-directory ${WORKING_DIR} --store-force yes"
mode='jrnl'
echo 'Journal (AIO) persistence...'
else
- JRNLFLAGS="--store-directory ${WORKING_DIR} --store-force yes"
+ JRNLFLAGS="--store-directory ${WORKING_DIR} --store-async no --store-force yes"
mode='bdb'
echo 'BDB persistence...'
fi
for p in `seq 1 6`; do
log="$abs_srcdir/vg-log.$mode.$p"
- #echo "$vg $QPIDD --load-module $LIBBDBSTORE $JRNLFLAGS"
- $vg $QPIDD -m 0 --load-module $LIBBDBSTORE $JRNLFLAGS >> "$abs_srcdir/qpid.log" 2> $log & pid=$!
+ #echo "$vg $QPIDD -m 0 --data dir "" --load-module $LIBBDBSTORE $JRNLFLAGS"
+ $vg $QPIDD -m 0 --data-dir "" --load-module $LIBBDBSTORE $JRNLFLAGS >> "$abs_srcdir/qpid.log" 2> $log & pid=$!
sleep 5
echo phase $p...
More information about the rhmessaging-commits
mailing list