rhmessaging commits: r4011 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-06-07 09:31:09 -0400 (Mon, 07 Jun 2010)
New Revision: 4011
Modified:
mgmt/newdata/cumin/python/cumin/config.py
Log:
Make --debug a no-param flag
Modified: mgmt/newdata/cumin/python/cumin/config.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/config.py 2010-06-07 13:29:55 UTC (rev 4010)
+++ mgmt/newdata/cumin/python/cumin/config.py 2010-06-07 13:31:09 UTC (rev 4011)
@@ -77,7 +77,7 @@
self.add_option("--model", default=section.model)
self.add_option("--log-file", default=section.log_file)
self.add_option("--log-level", default=section.log_level)
- self.add_option("--debug", default=section.debug)
+ self.add_option("--debug", action="store_true", default=section.debug)
self.add_option("--init-only", action="store_true")
def setup_logging(values):
14 years, 6 months
rhmessaging commits: r4010 - mgmt/newdata/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-06-07 09:29:55 -0400 (Mon, 07 Jun 2010)
New Revision: 4010
Modified:
mgmt/newdata/cumin/python/cumin/session.py
Log:
Turn off unused session features
Modified: mgmt/newdata/cumin/python/cumin/session.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/session.py 2010-06-04 18:43:28 UTC (rev 4009)
+++ mgmt/newdata/cumin/python/cumin/session.py 2010-06-07 13:29:55 UTC (rev 4010)
@@ -43,7 +43,9 @@
self.qmf_session = Session(CuminConsole(self),
manageConnections=True,
- rcvObjects=False)
+ rcvObjects=False,
+ rcvEvents=False,
+ rcvHeartbeats=False)
self.add_broker(self.broker_uri)
14 years, 6 months
rhmessaging commits: r4009 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-06-04 14:43:28 -0400 (Fri, 04 Jun 2010)
New Revision: 4009
Modified:
store/trunk/cpp/lib/jrnl/jdir.cpp
Log:
Further tidy-up: closing directory handles in exception paths
Modified: store/trunk/cpp/lib/jrnl/jdir.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jdir.cpp 2010-06-04 17:37:23 UTC (rev 4008)
+++ store/trunk/cpp/lib/jrnl/jdir.cpp 2010-06-04 18:43:28 UTC (rev 4009)
@@ -152,6 +152,7 @@
newname << bak_dir << "/" << entry->d_name;
if (::rename(oldname.str().c_str(), newname.str().c_str()))
{
+ ::closedir(dir);
std::ostringstream oss;
oss << "file=\"" << oldname.str() << "\" dest=\"" <<
newname.str() << "\"" << FORMAT_SYSERR(errno);
@@ -195,6 +196,7 @@
newname << bak_dir_name << "/" << target_dir;
if (::rename(oldname.str().c_str(), newname.str().c_str()))
{
+ ::closedir(dir);
std::ostringstream oss;
oss << "file=\"" << oldname.str() << "\" dest=\"" << newname.str() << "\"" << FORMAT_SYSERR(errno);
throw jexception(jerrno::JERR_JDIR_FMOVE, oss.str(), "jdir", "push_down");
@@ -284,6 +286,7 @@
std::string full_name(dirname + "/" + entry->d_name);
if (::stat(full_name.c_str(), &s))
{
+ ::closedir(dir);
std::ostringstream oss;
oss << "stat: file=\"" << full_name << "\"" << FORMAT_SYSERR(errno);
throw jexception(jerrno::JERR_JDIR_STAT, oss.str(), "jdir", "delete_dir");
@@ -294,6 +297,7 @@
{
if(::unlink(full_name.c_str()))
{
+ ::closedir(dir);
std::ostringstream oss;
oss << "unlink: file=\"" << entry->d_name << "\"" << FORMAT_SYSERR(errno);
throw jexception(jerrno::JERR_JDIR_UNLINK, oss.str(), "jdir", "delete_dir");
@@ -305,6 +309,7 @@
}
else // all other types, throw up!
{
+ ::closedir(dir);
std::ostringstream oss;
oss << "file=\"" << entry->d_name << "\" is not a dir, file or slink.";
oss << " (mode=0x" << std::hex << s.st_mode << std::dec << ")";
14 years, 6 months
rhmessaging commits: r4008 - in store/trunk/cpp/lib: jrnl and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-06-04 13:37:23 -0400 (Fri, 04 Jun 2010)
New Revision: 4008
Modified:
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/MessageStoreImpl.cpp
store/trunk/cpp/lib/jrnl/jdir.cpp
Log:
Fixes for various Coverity-indicated problems: 11689(MessageStoreImpl.cpp), 11691(jdir.cpp) and 11688(JournalImpl.cpp).
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2010-06-04 15:05:39 UTC (rev 4007)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2010-06-04 17:37:23 UTC (rev 4008)
@@ -498,7 +498,9 @@
void
JournalImpl::stop(bool block_till_aio_cmpl)
{
- (dynamic_cast<InactivityFireEvent*>(inactivityFireEventPtr.get()))->cancel();
+ InactivityFireEvent* ifep = dynamic_cast<InactivityFireEvent*>(inactivityFireEventPtr.get());
+ assert(ifep); // dynamic_cast can return null if the cast fails
+ ifep->cancel();
jcntl::stop(block_till_aio_cmpl);
if (_mgmtObject != 0) {
Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp 2010-06-04 15:05:39 UTC (rev 4007)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp 2010-06-04 17:37:23 UTC (rev 4008)
@@ -193,8 +193,7 @@
<< JRNL_MAX_NUM_FILES << "); changing this parameter to maximum value.");
return;
}
- u_int16_t q = opts->autoJrnlExpandMaxFiles;
- if (q && q == defAutoJrnlExpandMaxFiles && numJrnlFiles != defTplNumJrnlFiles) {
+ if (p && p == defAutoJrnlExpandMaxFiles && numJrnlFiles != defTplNumJrnlFiles) {
// num-jfiles is different from the default AND max-auto-expand-jfiles is still at default
// change value of max-auto-expand-jfiles
autoJrnlExpand = true;
@@ -1327,10 +1326,10 @@
}
}
} else {
- THROW_STORE_EXCEPTION(std::string("Queue ") + queue->getName() + ": store() failed: queue NULL.");
+ THROW_STORE_EXCEPTION(std::string("MessageStoreImpl::store() failed: queue NULL."));
}
} catch (const journal::jexception& e) {
- THROW_STORE_EXCEPTION(std::string("Queue ") + queue->getName() + ": store() failed: " +
+ THROW_STORE_EXCEPTION(std::string("Queue ") + queue->getName() + ": MessageStoreImpl::store() failed: " +
e.what());
}
}
Modified: store/trunk/cpp/lib/jrnl/jdir.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jdir.cpp 2010-06-04 15:05:39 UTC (rev 4007)
+++ store/trunk/cpp/lib/jrnl/jdir.cpp 2010-06-04 17:37:23 UTC (rev 4008)
@@ -202,6 +202,7 @@
break;
}
}
+ close_dir(dir, dirname, "push_down");
return bak_dir_name;
}
14 years, 6 months
rhmessaging commits: r4007 - mgmt/newdata/cumin/bin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-06-04 11:05:39 -0400 (Fri, 04 Jun 2010)
New Revision: 4007
Modified:
mgmt/newdata/cumin/bin/cumin-database
Log:
Refine the initialization check
Modified: mgmt/newdata/cumin/bin/cumin-database
===================================================================
--- mgmt/newdata/cumin/bin/cumin-database 2010-06-03 09:51:23 UTC (rev 4006)
+++ mgmt/newdata/cumin/bin/cumin-database 2010-06-04 15:05:39 UTC (rev 4007)
@@ -53,7 +53,7 @@
}
function check-initialized {
- if [[ ! -d "$pgdata" ]]; then
+ if [[ ! -f "$pghbaconf" ]]; then
echo "Error: The database is not initialized"
echo "Hint: Run 'cumin-database initialize'"
return 1
14 years, 6 months
rhmessaging commits: r4006 - store/trunk/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/utils.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-06-03 05:51:23 -0400 (Thu, 03 Jun 2010)
New Revision: 4006
Modified:
store/trunk/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/utils/BDBVMTestCase.java
Log:
Update QTC usage to QBTC to allow compilation
Modified: store/trunk/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/utils/BDBVMTestCase.java
===================================================================
--- store/trunk/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/utils/BDBVMTestCase.java 2010-06-02 19:33:45 UTC (rev 4005)
+++ store/trunk/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/utils/BDBVMTestCase.java 2010-06-03 09:51:23 UTC (rev 4006)
@@ -34,9 +34,9 @@
import org.apache.qpid.client.AMQQueue;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry;
-import org.apache.qpid.test.utils.QpidTestCase;
+import org.apache.qpid.test.utils.QpidBrokerTestCase;
-public class BDBVMTestCase extends QpidTestCase
+public class BDBVMTestCase extends QpidBrokerTestCase
{
public static final String BDB_WORK = "BDB_WORK";
public static final String QPID_WORK = "QPID_WORK";
14 years, 6 months
rhmessaging commits: r4005 - store/trunk/cpp/tests/python_tests.
by rhmessaging-commits@lists.jboss.org
Author: gordonsim
Date: 2010-06-02 15:33:45 -0400 (Wed, 02 Jun 2010)
New Revision: 4005
Modified:
store/trunk/cpp/tests/python_tests/client_persistence.py
store/trunk/cpp/tests/python_tests/store_test.py
Log:
Set reliability for link to prevent auto-delete being set on subscription queues (broker now cleans these up even for connections that are open when broker is shutdown)
Modified: store/trunk/cpp/tests/python_tests/client_persistence.py
===================================================================
--- store/trunk/cpp/tests/python_tests/client_persistence.py 2010-06-02 15:36:13 UTC (rev 4004)
+++ store/trunk/cpp/tests/python_tests/client_persistence.py 2010-06-02 19:33:45 UTC (rev 4005)
@@ -103,9 +103,9 @@
broker = self.broker(store_args(), name="testFanout", expect=EXPECT_EXIT_OK)
ssn = broker.connect().session()
snd = ssn.sender("TestFanoutExchange; {create: always, node: {type: topic, x-declare: {type: fanout}}}")
- ssn.receiver("TestFanoutExchange; {link: {name: \"q1\", durable: True}}")
- ssn.receiver("TestFanoutExchange; {link: {name: \"q2\", durable: True}}")
- ssn.receiver("TestFanoutExchange; {link: {name: \"q3\", durable: True}}")
+ ssn.receiver("TestFanoutExchange; {link: {name: \"q1\", durable: True, reliability:at-least-once}}")
+ ssn.receiver("TestFanoutExchange; {link: {name: \"q2\", durable: True, reliability:at-least-once}}")
+ ssn.receiver("TestFanoutExchange; {link: {name: \"q3\", durable: True, reliability:at-least-once}}")
msg1 = Message("Msg1", durable=True, correlation_id="Msg0001")
snd.send(msg1)
msg2 = Message("Msg2", durable=True, correlation_id="Msg0002")
Modified: store/trunk/cpp/tests/python_tests/store_test.py
===================================================================
--- store/trunk/cpp/tests/python_tests/store_test.py 2010-06-02 15:36:13 UTC (rev 4004)
+++ store/trunk/cpp/tests/python_tests/store_test.py 2010-06-02 19:33:45 UTC (rev 4005)
@@ -301,9 +301,11 @@
x_bindings_list = []
for binding in binding_list:
x_bindings_list.append("{exchange: %s, key: %s}" % binding)
+ if durable: reliability = 'at-least-once'
+ else: reliability = None
return self.addr_fmt(node_name, create_policy=create_policy, delete_policy=delete_policy, mode=mode, link=True,
link_name=link_name, durable=durable, x_declare_list=x_declare_list,
- x_bindings_list=x_bindings_list)
+ x_bindings_list=x_bindings_list, link_reliability=reliability)
def check_message(self, broker, queue, exp_msg, transactional=False, empty=False, ack=True, browse=False):
"""Check that a message is on a queue by dequeuing it and comparing it to the expected message"""
14 years, 6 months
rhmessaging commits: r4004 - store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-06-02 11:36:13 -0400 (Wed, 02 Jun 2010)
New Revision: 4004
Modified:
store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
Add some additional debug logging
Modified: store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2010-06-02 14:22:52 UTC (rev 4003)
+++ store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2010-06-02 15:36:13 UTC (rev 4004)
@@ -1112,11 +1112,11 @@
try
{
- _deliveryDb.put(tx, key, value);
if (_log.isDebugEnabled())
{
- _log.debug("Enqueuing message " + messageId + " on queue " + name + "[Transaction" + tx + "]");
+ _log.debug("Enqueuing message " + messageId + " on queue " + name + " [Transaction" + tx + "]");
}
+ _deliveryDb.put(tx, key, value);
}
catch (DatabaseException e)
{
@@ -1190,10 +1190,13 @@
*/
public void commitTran(StoreContext context) throws AMQException
{
- // _log.debug("public void commitTran(StoreContext context = " + context + "): called");
-
com.sleepycat.je.Transaction tx = (com.sleepycat.je.Transaction) context.getPayload();
+ if (_log.isDebugEnabled())
+ {
+ _log.debug("public void commitTran(StoreContext context = " + context + "): called with [Transaction" + tx + "]");
+ }
+
if (tx == null)
{
throw new AMQException("Fatal internal error: transactional context is empty at commitTran");
14 years, 6 months
rhmessaging commits: r4003 - mgmt/newdata/cumin/instance/etc.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-06-02 10:22:52 -0400 (Wed, 02 Jun 2010)
New Revision: 4003
Modified:
mgmt/newdata/cumin/instance/etc/cumin.conf
Log:
Don't use debug by default for the devel instance
Modified: mgmt/newdata/cumin/instance/etc/cumin.conf
===================================================================
--- mgmt/newdata/cumin/instance/etc/cumin.conf 2010-06-02 12:35:43 UTC (rev 4002)
+++ mgmt/newdata/cumin/instance/etc/cumin.conf 2010-06-02 14:22:52 UTC (rev 4003)
@@ -1,7 +1,7 @@
[common]
# database: dbname=cumin user=cumin host=localhost
# broker: localhost:5672
-debug: True
+# debug: False
[web]
# host: localhost
14 years, 6 months
rhmessaging commits: r4002 - store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-06-02 08:35:43 -0400 (Wed, 02 Jun 2010)
New Revision: 4002
Modified:
store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
Advance the cursor before notifying the recovery handler of a new QueueEntry to avoid DeadlockException if the handler then attempts to remove the QueueEntry from the store and is unable to to lock the record again. Signal QE recovery completion to prompt result logging.
Modified: store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2010-06-02 09:26:17 UTC (rev 4001)
+++ store/trunk/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2010-06-02 12:35:43 UTC (rev 4002)
@@ -704,9 +704,10 @@
EntryBinding keyBinding = new QueueEntryTB();
DatabaseEntry value = new DatabaseEntry();
- EntryBinding valueBinding = TupleBinding.getPrimitiveBinding(Long.class);
- while (cursor.getNext(key, value, LockMode.RMW) == OperationStatus.SUCCESS)
+ OperationStatus status = cursor.getNext(key, value, LockMode.RMW);
+
+ while (status == OperationStatus.SUCCESS)
{
QueueEntryKey dd = (QueueEntryKey) keyBinding.entryToObject(key);
@@ -714,13 +715,12 @@
AMQShortString queueName = dd.getQueueName();
long messageId = dd.getMessageId();
+ //Advance the cursor BEFORE passing the previous entry to the
+ //recovery handler. This is required in order to release the
+ //lock on the record in case the handler decides to remove it.
+ status = cursor.getNext(key, value, LockMode.RMW);
+
qerh.queueEntry(queueName.asString(),messageId);
-
-// if (_log.isDebugEnabled())
-// {
-// _log.debug("On recovery, delivering Message ID:" + message.getMessageId() + " to " + queue.getName());
-// }
-
}
}
catch (DatabaseException e)
@@ -736,17 +736,7 @@
}
}
-// if (_log.isInfoEnabled())
-// {
-// _log.info("Recovered message counts: " + _queueRecoveries);
-// }
-//
-// for(Map.Entry<AMQShortString,Integer> entry : _queueRecoveries.entrySet())
-// {
-// CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_RECOVERED(entry.getValue(), String.valueOf(entry.getKey())));
-//
-// CurrentActor.get().message(_logSubject, MessageStoreMessages.MST_RECOVERY_COMPLETE(String.valueOf(entry.getKey()), true));
-// }
+ qerh.completeQueueEntryRecovery();
}
/**
14 years, 6 months