rhmessaging commits: r4363 - store/trunk/cpp/lib.
by rhmessaging-commits@lists.jboss.org
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.");
14 years, 3 months
rhmessaging commits: r4362 - in store/trunk/cpp: tests/jrnl and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-09-30 10:52:39 -0400 (Thu, 30 Sep 2010)
New Revision: 4362
Modified:
store/trunk/cpp/lib/jrnl/wrfc.hpp
store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
Log:
Changed use of std::vector:data() for more portable solution. RHEL-4 did not like the data() member. Fixed some bad spelling in wrfc.hpp.
Modified: store/trunk/cpp/lib/jrnl/wrfc.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wrfc.hpp 2010-09-29 18:04:25 UTC (rev 4361)
+++ store/trunk/cpp/lib/jrnl/wrfc.hpp 2010-09-30 14:52:39 UTC (rev 4362)
@@ -52,7 +52,7 @@
/**
* \class wrfc
- * \brief Class to handle write manangement of a journal rotating file controller.
+ * \brief Class to handle write management of a journal rotating file controller.
*/
class wrfc : public rfc
{
@@ -90,7 +90,7 @@
u_int16_t earliest_index() const;
/**
- * \brief Determines if a paroposed write would cause the enqueue threshold to be exceeded.
+ * \brief Determines if a proposed write would cause the enqueue threshold to be exceeded.
*
* The following routine finds whether the next write will take the write pointer to beyond the
* enqueue limit threshold. The following illustrates how this is achieved.
Modified: store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp 2010-09-29 18:04:25 UTC (rev 4361)
+++ store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp 2010-09-30 14:52:39 UTC (rev 4362)
@@ -563,7 +563,7 @@
std::vector<char> sblk_buffer(JRNL_DBLK_SIZE * JRNL_SBLK_SIZE, fill_char);
u_int32_t fwritten_sblks = 0; // hdr
while (fwritten_sblks++ < fsize_sblks)
- of.write(sblk_buffer.data(), JRNL_DBLK_SIZE * JRNL_SBLK_SIZE);
+ of.write(&sblk_buffer[0], JRNL_DBLK_SIZE * JRNL_SBLK_SIZE);
}
}
};
14 years, 3 months
rhmessaging commits: r4361 - mgmt/newdata/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2010-09-29 14:04:25 -0400 (Wed, 29 Sep 2010)
New Revision: 4361
Modified:
mgmt/newdata/mint/python/mint/update.py
Log:
Improve logging for deferred links
Modified: mgmt/newdata/mint/python/mint/update.py
===================================================================
--- mgmt/newdata/mint/python/mint/update.py 2010-09-29 15:06:52 UTC (rev 4360)
+++ mgmt/newdata/mint/python/mint/update.py 2010-09-29 18:04:25 UTC (rev 4361)
@@ -426,7 +426,7 @@
else:
col, nvalue = self.process_value(cls, prop, value)
except MappingException, e:
- #log.debug(e)
+ log.debug(e)
continue
# XXX This optimization will be obsolete when QMF does it
@@ -469,8 +469,8 @@
link = DeferredLink(obj, ref)
agent.deferred_links_by_id[object_id].append(link)
- msg = "Referenced object %s hasn't appeared yet"
- raise MappingException(msg % object_id)
+ msg = "Deferring link to object %s %s"
+ raise MappingException(msg % (ref.that_cls, object_id))
value = that._id
@@ -560,6 +560,9 @@
self.this._class.sql_update_object.execute(cursor, values, (column,))
+ msg = "Realized deferred link to %s via %s"
+ log.debug(msg, that, self.reference)
+
class AgentUpdate(Update):
def __init__(self, model, qmf_agent):
super(AgentUpdate, self).__init__(model)
@@ -606,6 +609,12 @@
cursor.connection.commit()
+ def __repr__(self):
+ name = self.__class__.__name__
+ agent_id = self.get_agent_id()
+
+ return "%s(%s)" % (name, agent_id)
+
class AgentDelete(AgentUpdate):
def do_process(self, cursor, stats):
agent_id = self.get_agent_id()
14 years, 3 months
rhmessaging commits: r4360 - store/trunk/java/bdbstore/bin.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-09-29 11:06:52 -0400 (Wed, 29 Sep 2010)
New Revision: 4360
Removed:
store/trunk/java/bdbstore/bin/qpid-server-bdb.bat
Log:
remove old qpid-server-bdb.bat file
Deleted: store/trunk/java/bdbstore/bin/qpid-server-bdb.bat
===================================================================
--- store/trunk/java/bdbstore/bin/qpid-server-bdb.bat 2010-09-29 14:25:14 UTC (rev 4359)
+++ store/trunk/java/bdbstore/bin/qpid-server-bdb.bat 2010-09-29 15:06:52 UTC (rev 4360)
@@ -1,41 +0,0 @@
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM
-
-set VERSION=0.5
-
-rem Guess QPID_HOME if not defined
-set CURRENT_DIR=%cd%
-if not "%QPID_HOME%" == "" goto gotHome
-set QPID_HOME=%CURRENT_DIR%
-echo %QPID_HOME%
-if exist "%QPID_HOME%\bin\qpid-server.bat" goto okHome
-cd ..
-set QPID_HOME=%cd%
-cd %CURRENT_DIR%
-:gotHome
-if exist "%QPID_HOME%\bin\qpid-server.bat" goto okHome
-echo The QPID_HOME environment variable is not defined correctly
-echo This environment variable is needed to run this program
-goto end
-:okHome
-
-set BDBSTORE_HOME=%QPID_HOME%
-
-set QPID_MODULE_JARS=%BDBSTORE_HOME%\lib\qpid-bdbstore-%VERSION%.jar;%BDBSTORE_HOME%\lib\je-3.3.62.jar
-.\qpid-server.bat %*
14 years, 3 months
rhmessaging commits: r4359 - store/trunk/cpp/tests/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2010-09-29 10:25:14 -0400 (Wed, 29 Sep 2010)
New Revision: 4359
Modified:
store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
Log:
Fixed careless checkin r.4430 which broke ptolemy, some reformatting of lines > 120 chars
Modified: store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp 2010-09-29 10:42:30 UTC (rev 4358)
+++ store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp 2010-09-29 14:25:14 UTC (rev 4359)
@@ -213,7 +213,7 @@
* * current lfid == bad_lfid AND bad_lfid > oldest (ie we are past the oldest and preparing the
* bad lfid)
*/
- if (owi_invert_flag = full && oldest_lfid > 0 &&
+ if (full && oldest_lfid > 0 &&
(lfid == oldest_lfid || (bad_lfid > oldest_lfid && lfid == bad_lfid)))
owi = !owi;
const u_int64_t frid = u_int64_t(random());
@@ -461,7 +461,8 @@
{
stringstream fn;
fn << test_dir << "/" << base_filename << "." << JRNL_INFO_EXTENSION;
- BOOST_WARN_MESSAGE(::unlink(fn.str().c_str()) == 0, "clean_journal_info_file(): Failed to remove file " << fn.str());
+ BOOST_WARN_MESSAGE(::unlink(fn.str().c_str()) == 0, "clean_journal_info_file(): Failed to remove file " <<
+ fn.str());
}
static string create_journal_filename(const u_int16_t pfid, const string base_filename)
@@ -535,7 +536,10 @@
BOOST_FAIL("Error closing test journal file \"" << filename << "\".");
}
- static void write_file_header(const std::string& filename, ofstream& of, const file_hdr& fh, const char fill_char)
+ static void write_file_header(const std::string& filename,
+ ofstream& of,
+ const file_hdr& fh,
+ const char fill_char)
{
// write file header
u_int32_t cnt = sizeof(file_hdr);
@@ -602,7 +606,11 @@
}
u_int64_t
-enq_msg(jcntl& jc, const u_int64_t rid, const string& msg, const bool transient, const iores exp_ret = RHM_IORES_SUCCESS)
+enq_msg(jcntl& jc,
+ const u_int64_t rid,
+ const string& msg,
+ const bool transient,
+ const iores exp_ret = RHM_IORES_SUCCESS)
{
ostringstream ctxt;
ctxt << "enq_msg(" << rid << ")";
14 years, 3 months
rhmessaging commits: r4358 - store/branches/java/0.5.x-dev/bin.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-09-29 06:42:30 -0400 (Wed, 29 Sep 2010)
New Revision: 4358
Removed:
store/branches/java/0.5.x-dev/bin/qpid-server-bdb.bat
Log:
remove old qpid-server-bdb.bat file
Deleted: store/branches/java/0.5.x-dev/bin/qpid-server-bdb.bat
===================================================================
--- store/branches/java/0.5.x-dev/bin/qpid-server-bdb.bat 2010-09-28 14:58:40 UTC (rev 4357)
+++ store/branches/java/0.5.x-dev/bin/qpid-server-bdb.bat 2010-09-29 10:42:30 UTC (rev 4358)
@@ -1,42 +0,0 @@
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM
-
-set VERSION=0.5
-
-rem Guess QPID_HOME if not defined
-set CURRENT_DIR=%cd%
-if not "%QPID_HOME%" == "" goto gotHome
-set QPID_HOME=%CURRENT_DIR%
-echo %QPID_HOME%
-if exist "%QPID_HOME%\bin\qpid-server.bat" goto okHome
-cd ..
-set QPID_HOME=%cd%
-cd %CURRENT_DIR%
-:gotHome
-if exist "%QPID_HOME%\bin\qpid-server.bat" goto okHome
-echo The QPID_HOME environment variable is not defined correctly
-echo This environment variable is needed to run this program
-goto end
-:okHome
-
-set BDBSTORE_HOME=%QPID_HOME%
-
-set QPID_OPTS=%QPID_OPTS% -DJEMonitor=true
-set QPID_MODULE_JARS=%BDBSTORE_HOME%\lib\qpid-bdbstore-%VERSION%.jar;%BDBSTORE_HOME%\lib\je-4.0.103.jar;%BDBSTORE_HOME%\lib\JEJConsole.jar
-.\qpid-server.bat %*
14 years, 3 months
rhmessaging commits: r4357 - store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb.
by rhmessaging-commits@lists.jboss.org
Author: rgemmell
Date: 2010-09-28 10:58:40 -0400 (Tue, 28 Sep 2010)
New Revision: 4357
Modified:
store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
Log:
Stop incorrectly advising people to upgrade store versions when an exception is thrown during recovery, group catch blocks into a common Exception catch block
Modified: store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java
===================================================================
--- store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2010-09-28 14:57:46 UTC (rev 4356)
+++ store/branches/java/0.5.x-dev/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStore.java 2010-09-28 14:58:40 UTC (rev 4357)
@@ -1283,23 +1283,11 @@
commitTran(context);
}
- catch (DatabaseException e)
+ catch (Exception e)
{
abortTran(context);
-
throw new AMQException("Error recovering persistent state: " + e, e);
}
- catch (AMQException amqe)
- {
- abortTran(context);
- throw new AMQException("Error recovering persistent state: " + amqe, amqe);
- }
- catch (Throwable ioobe)
- {
- abortTran(context);
- throw new AMQException("Invalid database format. Please use upgrade tool for store in Virtualhost:'"
- + _virtualHost.getName() + "'", ioobe);
- }
stateTransition(State.RECOVERING, State.STARTED);
}
14 years, 3 months
rhmessaging commits: r4356 - mgmt/newdata/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2010-09-28 10:57:46 -0400 (Tue, 28 Sep 2010)
New Revision: 4356
Modified:
mgmt/newdata/cumin/python/cumin/grid/negotiator.py
mgmt/newdata/cumin/python/cumin/grid/negotiator.strings
Log:
Treat missing quota configs as an error.
- Display "error" instead of 0
- Show the error on mouseover
Modified: mgmt/newdata/cumin/python/cumin/grid/negotiator.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/negotiator.py 2010-09-28 14:34:49 UTC (rev 4355)
+++ mgmt/newdata/cumin/python/cumin/grid/negotiator.py 2010-09-28 14:57:46 UTC (rev 4356)
@@ -26,7 +26,6 @@
super(NegotiatorFrame, self).__init__(app, name, cls)
- self.group_add = NegotiatorGroupAdd(app, self)
#self.edit_dynamic_quota = NegotiatorEditDynamicQuota(app, self)
class NegotiatorSelector(ObjectSelector):
@@ -245,14 +244,18 @@
def render_content(self, session, group):
value = self.parent.group_helper.get_config_value(session, group, "GROUP_QUOTA_DYNAMIC")
self.task.form.group_leader.set(session, group)
+
try:
- if "loading" in value:
- return value
+ fval = float(value)
+ except ValueError:
+ return value
except TypeError:
- pass
+ if isinstance(value, Exception):
+ content = "<span class='QuotaError'>error</span>"
+ return fmt_link("#", content, "", "", value.message)
href = self.task.get_href(session)
- content = "%s%%" % str(round(float(value) * 100.0, 2))
+ content = "%s%%" % str(round(fval * 100.0, 2))
return fmt_link(href, content, "", "", self.fmt_hover(""))
class SpacerColumn(ItemTableColumn):
@@ -271,6 +274,9 @@
self.info = Attribute(app, "info")
self.add_attribute(self.info)
+ self.loading = Attribute(app, "loading")
+ self.add_attribute(self.loading)
+
def get_config_info(self, session):
negotiator = self.negotiator.get(session)
@@ -371,7 +377,10 @@
try:
for config in raw_configs:
for group in raw_configs[config]:
- info[group][config] = raw_configs[config][group].data['Value']
+ if raw_configs[config][group].error:
+ info[group][config] = raw_configs[config][group].error
+ else:
+ info[group][config] = raw_configs[config][group].data['Value']
except Exception, e:
log.exception(e)
@@ -387,6 +396,7 @@
info = self.get_config_for_groups(session, config, [group])
return info[group][config]
except:
+ self.loading.set(session, "loading")
return "<em>loading</em>"
def get_unclaimed_dyn_quota(self, session, groups):
@@ -629,7 +639,10 @@
def render_quota_value(self, session, group):
value = self.group_helper.get_config_value(session, group, "GROUP_QUOTA_DYNAMIC")
- return round(float(value) * 100.0, 2)
+ try:
+ return round(float(value) * 100.0, 2)
+ except:
+ return 0.0
def render_unclaimed_value(self, session, group):
group_leader = self.group_leader.get(session)
Modified: mgmt/newdata/cumin/python/cumin/grid/negotiator.strings
===================================================================
--- mgmt/newdata/cumin/python/cumin/grid/negotiator.strings 2010-09-28 14:34:49 UTC (rev 4355)
+++ mgmt/newdata/cumin/python/cumin/grid/negotiator.strings 2010-09-28 14:57:46 UTC (rev 4356)
@@ -6,7 +6,6 @@
padding: 0.75em;
}
-[NegotiatorOverview.css]
th.ExpandColumn {
width: 2em;
}
@@ -33,6 +32,11 @@
padding-right: 2em;
}
+span.QuotaError {
+ font-style: italic;
+ color: red;
+}
+
[NegotiatorOverview.html]
<div id="{id}" class="CuminTable GroupTable">
<table {class}>
14 years, 3 months