-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16573/
-----------------------------------------------------------
(Updated Jan. 2, 2014, 7:41 p.m.)
Review request for qpid, Kim van der Riet and Ted Ross.
Changes
-------
Changed summary to reference the jira
Summary (updated)
-----------------
QPID-5418: Prevent qpidd from loading multiple store modules
Bugs: QPID-5418
https://issues.apache.org/jira/browse/QPID-5418
Repository: qpid
Description
-------
Fix for bz1038047 https://bugzilla.redhat.com/show_bug.cgi?id=1038047
This prevents multiple store modules from loading. It logs an error and throws
an exception when the second module attempts to call Broker::setStore(..).
Broker::setStore(with a reference to a store object) is never called with the
null store, so that seemed a logical place to catch multiple store modules.
I was going to put the name of the store module that was attempting to load in
the error log and exception, but that proved more difficult that it was worth.
If there is an easy way to get the store module name, please let me know.
Diffs
-----
/trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1554878
Diff: https://reviews.apache.org/r/16573/diff/
Testing
-------
Verified that an attempt to load multiple store plugins (or the same one
multiple times) fails
./qpidd --data-dir /home/eallen/tmp --store-dir /home/eallen/tmp --auth=no -p
5666 --no-module-dir --mgmt-enable=no --log-to-file /home/eallen/tmp/qpid_1.log
--log-enable debug --log-source yes --log-function yes --load-module
/home/eallen/trunk/qpid/cpp/build/src/linearstore.so --load-module
/home/eallen/trunk/qpid/cpp/build/src/legacystore.so
[System] debug
/home/eallen/trunk/qpid/cpp/src/qpid/Exception.cpp:43:qpid::Exception::Exception:
Exception constructed: Failed to start broker: Multiple store plugins were
loaded (/home/eallen/trunk/qpid/cpp/src/qpid/broker/Broker.cpp:430)
Verified behavior is the same when qpidd is started as a deamon and when it's
started as a non-deamon
Verified qpidd starts normally without any store module
Verified qpidd starts normally with a single store module
Thanks,
Ernie Allen