rhmessaging commits: r3078 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-01-28 12:58:51 -0500 (Wed, 28 Jan 2009)
New Revision: 3078
Modified:
mgmt/trunk/cumin/python/cumin/user.py
Log:
Clarify that we're expiring user sessions; too many session things about
Modified: mgmt/trunk/cumin/python/cumin/user.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/user.py 2009-01-27 22:00:27 UTC (rev 3077)
+++ mgmt/trunk/cumin/python/cumin/user.py 2009-01-28 17:58:51 UTC (rev 3078)
@@ -50,7 +50,7 @@
session.delete()
count += 1
- log.debug("Expired %i sessions", count)
+ log.debug("Expired %i user sessions", count)
class LoginPage(Page):
def __init__(self, app, name):
15 years, 11 months
rhmessaging commits: r3077 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-01-27 17:00:27 -0500 (Tue, 27 Jan 2009)
New Revision: 3077
Modified:
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/cumin/python/cumin/pool.py
mgmt/trunk/cumin/python/cumin/pool.strings
mgmt/trunk/cumin/python/cumin/slot.strings
mgmt/trunk/cumin/python/cumin/stat.py
mgmt/trunk/cumin/python/cumin/stat.strings
mgmt/trunk/cumin/python/cumin/system.strings
Log:
Added slot state to grid slot visualization.
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2009-01-27 21:59:38 UTC (rev 3076)
+++ mgmt/trunk/cumin/python/cumin/model.py 2009-01-27 22:00:27 UTC (rev 3077)
@@ -629,8 +629,14 @@
("Benchmarking", "yellow"),
("Unknown", "grey")]
+ load_states = [("Unclaimed", "Unclaimed"),
+ ("Claimed", "Claimed"),
+ ("Owner", "Owner"),
+ ("Matched", "Matched"),
+ ("Preempting", "Preempting")]
+
def get_field_tuples(self, session):
- return [("name", "Name"), ("machine", "Machine"), ("job_id", "Job")]
+ return [("name", "Name"), ("machine", "Machine"), ("job_id", "Job"), ("state", "State"), ("activity", "Activity")]
def get_extra(self, session, slot):
return [("jid", slot["jid"])]
@@ -645,6 +651,9 @@
def get_colors(self):
return self.load_colors
+ def get_states(self):
+ return self.load_states
+
class CuminSystem(RemoteClass):
def __init__(self, model):
super(CuminSystem, self).__init__(model, "system", Sysimage, SysimageStats)
Modified: mgmt/trunk/cumin/python/cumin/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.py 2009-01-27 21:59:38 UTC (rev 3076)
+++ mgmt/trunk/cumin/python/cumin/pool.py 2009-01-27 22:00:27 UTC (rev 3077)
@@ -394,6 +394,10 @@
action = self.app.model.pool.slots
return action.get_colors()
+ def get_states(self, session):
+ action = self.app.model.pool.slots
+ return action.get_states()
+
def get_color(self, session, job):
action = self.app.model.pool.slots
return action.get_color(session, job)
Modified: mgmt/trunk/cumin/python/cumin/pool.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/pool.strings 2009-01-27 21:59:38 UTC (rev 3076)
+++ mgmt/trunk/cumin/python/cumin/pool.strings 2009-01-27 22:00:27 UTC (rev 3077)
@@ -92,6 +92,15 @@
font-size: 0.8em;
}
+div#legend_slot_grid { float: left; margin-right: 1.5em;}
+div#legend_slot_grid h2, div#legend1_slot_grid h2 { margin-bottom: 1em;}
+div#legend1_slot_grid .btn.Unclaimed,
+div#legend1_slot_grid .btn.Claimed,
+div#legend1_slot_grid .btn.Matched,
+div#legend1_slot_grid .btn.Owner,
+div#legend1_slot_grid .btn.Preempting { width:28px; height:28px; margin-bottom:1px;}
+
+
[PoolStats.html]
<div style="width: 50%; float: left;">
<h2>General</h2>
@@ -120,8 +129,13 @@
</div>
</div>
<div id="legend_{name}" class="cell_legend">
+ <h2>Activities</h2>
{grid_legend}
</div>
+ <div id="legend1_{name}" class="cell_legend">
+ <h2>States</h2>
+ {grid_legend1}
+ </div>
</div>
</div>
{grid_updater}
Modified: mgmt/trunk/cumin/python/cumin/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/slot.strings 2009-01-27 21:59:38 UTC (rev 3076)
+++ mgmt/trunk/cumin/python/cumin/slot.strings 2009-01-27 22:00:27 UTC (rev 3077)
@@ -6,7 +6,8 @@
s.system,
s.job_id,
j.id as jid,
- c.activity
+ c.activity,
+ c.state
from slot as s
left outer join slot_stats as c on c.id = s.stats_curr_id
left outer join job as j on j.custom_id = s.job_id
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-01-27 21:59:38 UTC (rev 3076)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-01-27 22:00:27 UTC (rev 3077)
@@ -148,8 +148,13 @@
self.add_child(self.cells)
legend = self.Legend(app, "grid_legend")
+ legend.get_method = self.get_colors
self.add_child(legend)
+ legend1 = self.Legend(app, "grid_legend1")
+ legend1.get_method = self.get_states
+ self.add_child(legend1)
+
ajax = self.Updater(app, "grid_updater")
self.add_child(ajax)
@@ -285,6 +290,9 @@
def get_colors(self, session):
return ["clear"]
+ def get_states(self, session):
+ return ["Unclaimed"]
+
def get_url(self, session):
""" returns something like
"call.xml?class=system;id=%i;method=slots" % system.id
@@ -309,7 +317,7 @@
return super(StatUtilizationGrid.Legend, self).render(session, *args)
def do_get_items(self, session, *args):
- return self.parent.get_colors(session)
+ return self.get_method(session)
def render_legend_text(self, session, color):
return color[0]
Modified: mgmt/trunk/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.strings 2009-01-27 21:59:38 UTC (rev 3076)
+++ mgmt/trunk/cumin/python/cumin/stat.strings 2009-01-27 22:00:27 UTC (rev 3077)
@@ -246,7 +246,12 @@
.btn.green2 { background: #6c6; }
.btn.green3 { background: #393; }
-.btn[class] { background-image: url(resource?name=shade1.png); background-position: bottom; }
+.btn[class] { background-position: bottom; }
+.btn.Claimed { background-image: url(resource?name=claimed1.png); }
+.btn.Unclaimed { background-image: url(resource?name=shade1.png); }
+.btn.Matched { background-image: url(resource?name=match.png); }
+.btn.Owner { background-image: url(resource?name=pwn.png); }
+.btn.Preempting { background-image: url(resource?name=preempt.png); }
div.visualization {
padding-right: 2em;
@@ -334,5 +339,5 @@
[Legend.item_html]
<li>
- <button class="btn {legend_color}" style="background-image: none; width:1em; height:1em;" ></button> {legend_text}
+ <button class="btn {legend_color}" ></button> {legend_text}
</li>
Modified: mgmt/trunk/cumin/python/cumin/system.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/system.strings 2009-01-27 21:59:38 UTC (rev 3076)
+++ mgmt/trunk/cumin/python/cumin/system.strings 2009-01-27 22:00:27 UTC (rev 3077)
@@ -52,7 +52,7 @@
var slot = obj.slots.slot[cell]
var oslot_Button = document.getElementById("button_"+cell);
if (oslot_Button) {
- oslot_Button.className = "btn "+slot.color;
+ oslot_Button.className = "btn " + slot.color + " " + slot.state;
oslot_Button.onmouseover = over_cell;
oslot_Button.onmouseout = out_cell;
if (slot.jid == "None") {
@@ -70,10 +70,18 @@
if (oslot_Machine) {
oslot_Machine.innerHTML = slot.machine;
}
- var oslot_Job = document.getElementById("cell_job_id_"+cell);
- if (oslot_Job) {
- oslot_Job.innerHTML = slot.job_id;
- }
+ var oslot_Job = document.getElementById("cell_job_id_"+cell);
+ if (oslot_Job) {
+ oslot_Job.innerHTML = slot.job_id;
+ }
+ var oslot_State = document.getElementById("cell_state_"+cell);
+ if (oslot_State) {
+ oslot_State.innerHTML = slot.state;
+ }
+ var oslot_Activity = document.getElementById("cell_activity_"+cell);
+ if (oslot_Activity) {
+ oslot_Activity.innerHTML = slot.activity;
+ }
}
setTimeout("get_slot_grid()", 2500);
}
15 years, 11 months
rhmessaging commits: r3076 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-01-27 16:59:38 -0500 (Tue, 27 Jan 2009)
New Revision: 3076
Added:
mgmt/trunk/cumin/resources/claimed1.png
mgmt/trunk/cumin/resources/match.png
mgmt/trunk/cumin/resources/preempt.png
mgmt/trunk/cumin/resources/pwn.png
Log:
Slot state background images
Added: mgmt/trunk/cumin/resources/claimed1.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/claimed1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/match.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/match.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/preempt.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/preempt.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: mgmt/trunk/cumin/resources/pwn.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/pwn.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 11 months
rhmessaging commits: r3075 - store/trunk/cpp/lib.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-01-27 16:41:40 -0500 (Tue, 27 Jan 2009)
New Revision: 3075
Modified:
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/JournalImpl.h
store/trunk/cpp/lib/MessageStoreImpl.cpp
Log:
Fix for BZ 481822 - "Store: Message content loss during staging/loading if header size changes in interim".
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2009-01-27 15:09:50 UTC (rev 3074)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2009-01-27 21:41:40 UTC (rev 3075)
@@ -237,7 +237,7 @@
#define MAX_AIO_SLEEPS 1000 // 10 sec
#define AIO_SLEEP_TIME 10000 // 10 ms
bool
-JournalImpl::loadMsgContent(u_int64_t rid, std::string& data, size_t offset, size_t length)
+JournalImpl::loadMsgContent(u_int64_t rid, std::string& data, size_t length)
{
if (_dtok.rid() != rid)
{
@@ -307,6 +307,7 @@
}
if (_external)
return false;
+ u_int32_t offset = qpid::framing::Buffer(static_cast<char*>(_datap), sizeof(u_int32_t)).getLong() + sizeof(u_int32_t);
if (offset + length > _dlen) {
data.append((const char*)_datap + offset, _dlen - offset);
} else {
Modified: store/trunk/cpp/lib/JournalImpl.h
===================================================================
--- store/trunk/cpp/lib/JournalImpl.h 2009-01-27 15:09:50 UTC (rev 3074)
+++ store/trunk/cpp/lib/JournalImpl.h 2009-01-27 21:41:40 UTC (rev 3075)
@@ -148,7 +148,7 @@
// Temporary fn to read and save last msg read from journal so it can be assigned
// in chunks. To be replaced when coding to do this direct from the journal is ready.
// Returns true if the record is extern, false if local.
- bool loadMsgContent(u_int64_t rid, std::string& data, size_t offset, size_t length);
+ bool loadMsgContent(u_int64_t rid, std::string& data, size_t length);
// Overrides for write inactivity timer
void enqueue_data_record(const void* const data_buff, const size_t tot_data_len,
Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp 2009-01-27 15:09:50 UTC (rev 3074)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp 2009-01-27 21:41:40 UTC (rev 3075)
@@ -1258,14 +1258,13 @@
u_int32_t length)
{
checkInit();
- u_int64_t realOffset = offset + sizeof(u_int32_t)/*header length*/ + msg->encodedHeaderSize();
u_int64_t messageId (msg->getPersistenceId());
if (messageId != 0) {
try {
JournalImpl* jc = static_cast<JournalImpl*>(queue.getExternalQueueStore());
if (jc && jc->is_enqueued(messageId) ) {
- if (jc->loadMsgContent(messageId, data, realOffset, length)) {
+ if (jc->loadMsgContent(messageId, data, length)) {
return;
}
}
@@ -1278,11 +1277,26 @@
Dbt key (&messageId, sizeof(messageId));
char *buffer = new char[length];
Dbt value(buffer, length);
+
+ // Read the first 4 bytes (u_int32_t) which is the header size.
value.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
+ value.set_ulen(sizeof(u_int32_t));
+ value.set_doff(0);
+ value.set_dlen(sizeof(u_int32_t));
+ int status = messageDb->get(txn.get(), &key, &value, 0);
+ if (status == DB_NOTFOUND) {
+ delete [] buffer;
+ THROW_STORE_EXCEPTION("Cannot load content. Message not known to store!");
+ }
+ u_int32_t hdr_size = Buffer(buffer, sizeof(u_int32_t)).getLong();
+
+ // Now read the data.
+ u_int64_t realOffset = sizeof(u_int32_t) + hdr_size + offset;
+ value.set_flags(DB_DBT_USERMEM | DB_DBT_PARTIAL);
value.set_ulen(length);
value.set_doff(realOffset);
value.set_dlen(length);
- int status = messageDb->get(txn.get(), &key, &value, 0);
+ status = messageDb->get(txn.get(), &key, &value, 0);
if (status == DB_NOTFOUND) {
delete [] buffer;
THROW_STORE_EXCEPTION("Cannot load content. Message not known to store!");
15 years, 11 months
rhmessaging commits: r3074 - store/trunk/cpp/tests.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-01-27 10:09:50 -0500 (Tue, 27 Jan 2009)
New Revision: 3074
Modified:
store/trunk/cpp/tests/OrderingTest.cpp
store/trunk/cpp/tests/SimpleTest.cpp
store/trunk/cpp/tests/TransactionalTest.cpp
store/trunk/cpp/tests/TwoPhaseCommitTest.cpp
Log:
Reset the log level to error+ for system tests
Modified: store/trunk/cpp/tests/OrderingTest.cpp
===================================================================
--- store/trunk/cpp/tests/OrderingTest.cpp 2009-01-26 23:36:56 UTC (rev 3073)
+++ store/trunk/cpp/tests/OrderingTest.cpp 2009-01-27 15:09:50 UTC (rev 3074)
@@ -33,7 +33,14 @@
#include <qpid/broker/Queue.h>
#include <qpid/broker/RecoveryManagerImpl.h>
#include <qpid/framing/AMQHeaderBody.h>
+#include "qpid/log/Logger.h"
+#define SET_LOG_LEVEL(level) \
+ qpid::log::Options opts(""); \
+ opts.selectors.clear(); \
+ opts.selectors.push_back(level); \
+ qpid::log::Logger::instance().configure(opts);
+
using namespace qpid::broker;
using namespace qpid::framing;
using namespace mrg::msgstore;
@@ -122,6 +129,8 @@
QPID_AUTO_TEST_CASE(Basic)
{
+ SET_LOG_LEVEL("error+"); // This only needs to be set once.
+
std::cout << test_filename << ".Basic: " << std::flush;
setup();
//push on 10 messages
Modified: store/trunk/cpp/tests/SimpleTest.cpp
===================================================================
--- store/trunk/cpp/tests/SimpleTest.cpp 2009-01-26 23:36:56 UTC (rev 3073)
+++ store/trunk/cpp/tests/SimpleTest.cpp 2009-01-27 15:09:50 UTC (rev 3074)
@@ -34,7 +34,15 @@
#include <qpid/broker/RecoveryManagerImpl.h>
#include <qpid/framing/AMQHeaderBody.h>
#include <qpid/framing/FieldTable.h>
+#include "qpid/log/Logger.h"
+#define SET_LOG_LEVEL(level) \
+ qpid::log::Options opts(""); \
+ opts.selectors.clear(); \
+ opts.selectors.push_back(level); \
+ qpid::log::Logger::instance().configure(opts);
+
+
using boost::intrusive_ptr;
using boost::static_pointer_cast;
using namespace qpid;
@@ -133,8 +141,9 @@
QPID_AUTO_TEST_CASE(CreateDelete)
{
+ SET_LOG_LEVEL("error+"); // This only needs to be set once.
+
cout << test_filename << ".CreateDelete: " << flush;
-
MessageStoreImpl store;
store.init(test_dir, 4, 1, 8);
store.truncate();//make sure it is empty to begin with
Modified: store/trunk/cpp/tests/TransactionalTest.cpp
===================================================================
--- store/trunk/cpp/tests/TransactionalTest.cpp 2009-01-26 23:36:56 UTC (rev 3073)
+++ store/trunk/cpp/tests/TransactionalTest.cpp 2009-01-27 15:09:50 UTC (rev 3074)
@@ -34,7 +34,14 @@
#include "qpid/broker/RecoveryManagerImpl.h"
#include "qpid/framing/AMQHeaderBody.h"
#include "qpid/log/Statement.h"
+#include "qpid/log/Logger.h"
+#define SET_LOG_LEVEL(level) \
+ qpid::log::Options opts(""); \
+ opts.selectors.clear(); \
+ opts.selectors.push_back(level); \
+ qpid::log::Logger::instance().configure(opts);
+
using namespace mrg::msgstore;
using namespace qpid::broker;
using namespace qpid::framing;
@@ -239,6 +246,8 @@
QPID_AUTO_TEST_CASE(Commit)
{
+ SET_LOG_LEVEL("error+"); // This only needs to be set once.
+
cout << test_filename << ".Commit: " << flush;
swap(true);
cout << "ok" << endl;
Modified: store/trunk/cpp/tests/TwoPhaseCommitTest.cpp
===================================================================
--- store/trunk/cpp/tests/TwoPhaseCommitTest.cpp 2009-01-26 23:36:56 UTC (rev 3073)
+++ store/trunk/cpp/tests/TwoPhaseCommitTest.cpp 2009-01-27 15:09:50 UTC (rev 3074)
@@ -35,7 +35,14 @@
#include "qpid/framing/AMQHeaderBody.h"
#include "qpid/log/Statement.h"
#include "TxnCtxt.h"
+#include "qpid/log/Logger.h"
+#define SET_LOG_LEVEL(level) \
+ qpid::log::Options opts(""); \
+ opts.selectors.clear(); \
+ opts.selectors.push_back(level); \
+ qpid::log::Logger::instance().configure(opts);
+
using namespace mrg::msgstore;
using namespace qpid::broker;
using namespace qpid::framing;
@@ -511,6 +518,8 @@
QPID_AUTO_TEST_CASE(CommitEnqueue)
{
+ SET_LOG_LEVEL("error+"); // This only needs to be set once.
+
cout << test_filename << ".CommitEnqueue: " << flush;
tpct.testCommitEnqueue();
cout << "ok" << endl;
15 years, 11 months
rhmessaging commits: r3073 - mgmt/trunk/mint/python/mint.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2009-01-26 18:36:56 -0500 (Mon, 26 Jan 2009)
New Revision: 3073
Modified:
mgmt/trunk/mint/python/mint/__init__.py
Log:
handle exception from Postgresql when the DB is stopped, and properly terminate threads/subprocs
Modified: mgmt/trunk/mint/python/mint/__init__.py
===================================================================
--- mgmt/trunk/mint/python/mint/__init__.py 2009-01-26 12:23:05 UTC (rev 3072)
+++ mgmt/trunk/mint/python/mint/__init__.py 2009-01-26 23:36:56 UTC (rev 3073)
@@ -17,6 +17,7 @@
from qmf.console import ClassKey
from util import *
from time import sleep
+from psycopg2 import OperationalError
log = logging.getLogger("mint")
@@ -562,6 +563,10 @@
break
self.do_run()
+ except OperationalError, e:
+ log.exception(e)
+ if str(e).find("server closed the connection unexpectedly") >= 0:
+ sys.exit()
except Exception, e:
log.exception(e)
15 years, 11 months
rhmessaging commits: r3072 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-01-26 07:23:05 -0500 (Mon, 26 Jan 2009)
New Revision: 3072
Modified:
store/trunk/cpp/lib/jrnl/rfc.hpp
store/trunk/cpp/lib/jrnl/rrfc.hpp
Log:
Fixes for some doxygen comment tags
Modified: store/trunk/cpp/lib/jrnl/rfc.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rfc.hpp 2009-01-23 14:04:11 UTC (rev 3071)
+++ store/trunk/cpp/lib/jrnl/rfc.hpp 2009-01-26 12:23:05 UTC (rev 3072)
@@ -114,22 +114,22 @@
virtual void finalize();
/**
- * /brief Check initialization state: true = Not Uninitialized, ie Initialized or Active; false = Uninitialized.
+ * \brief Check initialization state: true = Not Uninitialized, ie Initialized or Active; false = Uninitialized.
*/
virtual inline bool is_init() const { return _lpmp->is_init(); }
/**
- * /brief Check active state: true = Initialized and _curr_fc not null; false otherwise.
+ * \brief Check active state: true = Initialized and _curr_fc not null; false otherwise.
*/
virtual inline bool is_active() const { return _lpmp->is_init() && _curr_fc != 0; }
/**
- * /brief Sets the current file index and active fcntl object. Moves to state Active.
+ * \brief Sets the current file index and active fcntl object. Moves to state Active.
*/
virtual void set_findex(const u_int16_t fc_index);
/**
- * /brief Nulls the current file index and active fcntl pointer, moves to state Inactive.
+ * \brief Nulls the current file index and active fcntl pointer, moves to state Inactive.
*/
virtual void unset_findex();
Modified: store/trunk/cpp/lib/jrnl/rrfc.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rrfc.hpp 2009-01-23 14:04:11 UTC (rev 3071)
+++ store/trunk/cpp/lib/jrnl/rrfc.hpp 2009-01-26 12:23:05 UTC (rev 3072)
@@ -109,33 +109,33 @@
void finalize();
/**
- * /brief Opens the file handle for reading a particular fid. Moves to state open.
+ * \brief Opens the file handle for reading a particular fid. Moves to state open.
*/
void set_findex(const u_int16_t fc_index);
/**
- * /brief Closes the read file handle and nulls the active fcntl pointer. Moves to state closed.
+ * \brief Closes the read file handle and nulls the active fcntl pointer. Moves to state closed.
*/
void unset_findex();
/**
- * /brief Check the state: true = open; false = closed.
+ * \brief Check the state: true = open; false = closed.
*/
inline bool is_active() const { return _curr_fc != 0 && _fh >= 0; }
/**
- * /brief Sets the validity flag which indicates that the read buffers contain valid data for reading.
+ * \brief Sets the validity flag which indicates that the read buffers contain valid data for reading.
*/
inline void set_invalid() { _valid = false; }
/**
- * /brief Resets the validity flag wich indicates that the read buffers are no longer synchronized and cannot
+ * \brief Resets the validity flag wich indicates that the read buffers are no longer synchronized and cannot
* be read whithout resynchronization.
*/
inline void set_valid() { _valid = true; }
/**
- * /brief Checks the read buffer validity status: true = valid, can be read; false = invalid, synchronization
+ * \brief Checks the read buffer validity status: true = valid, can be read; false = invalid, synchronization
* required.
*/
inline bool is_valid() const { return _valid; }
15 years, 11 months
rhmessaging commits: r3071 - store/trunk/cpp/tests.
by rhmessaging-commits@lists.jboss.org
Author: aconway
Date: 2009-01-23 09:04:11 -0500 (Fri, 23 Jan 2009)
New Revision: 3071
Modified:
store/trunk/cpp/tests/MessageUtils.h
Log:
Fix build error.
Modified: store/trunk/cpp/tests/MessageUtils.h
===================================================================
--- store/trunk/cpp/tests/MessageUtils.h 2009-01-23 13:41:06 UTC (rev 3070)
+++ store/trunk/cpp/tests/MessageUtils.h 2009-01-23 14:04:11 UTC (rev 3071)
@@ -38,7 +38,7 @@
boost::intrusive_ptr<Message> msg(new Message());
AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0)));
- AMQFrame header((AMQHeaderBody>()));
+ AMQFrame header((AMQHeaderBody()));
msg->getFrames().append(method);
msg->getFrames().append(header);
15 years, 11 months
rhmessaging commits: r3070 - store/trunk/cpp/tests.
by rhmessaging-commits@lists.jboss.org
Author: aconway
Date: 2009-01-23 08:41:06 -0500 (Fri, 23 Jan 2009)
New Revision: 3070
Modified:
store/trunk/cpp/tests/MessageUtils.h
Log:
Fix build error.
Modified: store/trunk/cpp/tests/MessageUtils.h
===================================================================
--- store/trunk/cpp/tests/MessageUtils.h 2009-01-22 20:26:18 UTC (rev 3069)
+++ store/trunk/cpp/tests/MessageUtils.h 2009-01-23 13:41:06 UTC (rev 3070)
@@ -37,8 +37,8 @@
{
boost::intrusive_ptr<Message> msg(new Message());
- AMQFrame method(in_place<MessageTransferBody>(ProtocolVersion(), exchange, 0, 0));
- AMQFrame header(in_place<AMQHeaderBody>());
+ AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0)));
+ AMQFrame header((AMQHeaderBody>()));
msg->getFrames().append(method);
msg->getFrames().append(header);
@@ -51,7 +51,7 @@
static void addContent(boost::intrusive_ptr<Message> msg, const string& data)
{
- AMQFrame content(in_place<AMQContentBody>(data));
+ AMQFrame content((AMQContentBody(data)));
msg->getFrames().append(content);
}
15 years, 11 months
rhmessaging commits: r3069 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-01-22 15:26:18 -0500 (Thu, 22 Jan 2009)
New Revision: 3069
Modified:
store/trunk/cpp/lib/jrnl/fcntl.cpp
store/trunk/cpp/lib/jrnl/fcntl.hpp
store/trunk/cpp/lib/jrnl/jerrno.cpp
store/trunk/cpp/lib/jrnl/jerrno.hpp
Log:
Reverted the changes of r.3060. Testing has shown that the issue changed in that checkin was no the source of the bug.
Modified: store/trunk/cpp/lib/jrnl/fcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/fcntl.cpp 2009-01-22 20:13:06 UTC (rev 3068)
+++ store/trunk/cpp/lib/jrnl/fcntl.cpp 2009-01-22 20:26:18 UTC (rev 3069)
@@ -186,6 +186,20 @@
}
u_int32_t
+fcntl::add_rd_cmpl_cnt_dblks(u_int32_t a)
+{
+ if (_rd_cmpl_cnt_dblks + a > _rd_subm_cnt_dblks)
+ {
+ std::ostringstream oss;
+ oss << "pfid=" << _pfid << " lfid=" << _lfid << " rd_cmpl_cnt_dblks=" << _rd_cmpl_cnt_dblks << " incr=" << a;
+ oss << " rd_subm_cnt_dblks=" << _rd_subm_cnt_dblks;
+ throw jexception(jerrno::JERR_FCNTL_CMPLOFFSOVFL, oss.str(), "fcntl", "add_rd_cmpl_cnt_dblks");
+ }
+ _rd_cmpl_cnt_dblks += a;
+ return _rd_cmpl_cnt_dblks;
+}
+
+u_int32_t
fcntl::add_wr_subm_cnt_dblks(u_int32_t a)
{
if (_wr_subm_cnt_dblks + a > _ffull_dblks) // Allow for file header
@@ -199,6 +213,20 @@
return _wr_subm_cnt_dblks;
}
+u_int32_t
+fcntl::add_wr_cmpl_cnt_dblks(u_int32_t a)
+{
+ if (_wr_cmpl_cnt_dblks + a > _wr_subm_cnt_dblks)
+ {
+ std::ostringstream oss;
+ oss << "pfid=" << _pfid << " lfid=" << _lfid << " wr_cmpl_cnt_dblks=" << _wr_cmpl_cnt_dblks << " incr=" << a;
+ oss << " wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks;
+ throw jexception(jerrno::JERR_FCNTL_CMPLOFFSOVFL, oss.str(), "fcntl", "add_wr_cmpl_cnt_dblks");
+ }
+ _wr_cmpl_cnt_dblks += a;
+ return _wr_cmpl_cnt_dblks;
+}
+
u_int16_t
fcntl::decr_aio_cnt()
{
Modified: store/trunk/cpp/lib/jrnl/fcntl.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/fcntl.hpp 2009-01-22 20:13:06 UTC (rev 3068)
+++ store/trunk/cpp/lib/jrnl/fcntl.hpp 2009-01-22 20:26:18 UTC (rev 3069)
@@ -101,7 +101,7 @@
inline u_int32_t rd_cmpl_cnt_dblks() const { return _rd_cmpl_cnt_dblks; }
inline std::size_t rd_cmpl_offs() const { return _rd_cmpl_cnt_dblks * JRNL_DBLK_SIZE; }
- inline u_int32_t add_rd_cmpl_cnt_dblks(u_int32_t a) { _rd_cmpl_cnt_dblks += a; return _rd_cmpl_cnt_dblks; }
+ u_int32_t add_rd_cmpl_cnt_dblks(u_int32_t a);
inline u_int32_t wr_subm_cnt_dblks() const { return _wr_subm_cnt_dblks; }
inline std::size_t wr_subm_offs() const { return _wr_subm_cnt_dblks * JRNL_DBLK_SIZE; }
@@ -109,7 +109,7 @@
inline u_int32_t wr_cmpl_cnt_dblks() const { return _wr_cmpl_cnt_dblks; }
inline std::size_t wr_cmpl_offs() const { return _wr_cmpl_cnt_dblks * JRNL_DBLK_SIZE; }
- inline u_int32_t add_wr_cmpl_cnt_dblks(u_int32_t a) { _wr_cmpl_cnt_dblks += a; return _wr_cmpl_cnt_dblks; }
+ u_int32_t add_wr_cmpl_cnt_dblks(u_int32_t a);
inline u_int16_t aio_cnt() const { return _aio_cnt; }
inline u_int16_t incr_aio_cnt() { return ++_aio_cnt; }
Modified: store/trunk/cpp/lib/jrnl/jerrno.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jerrno.cpp 2009-01-22 20:13:06 UTC (rev 3068)
+++ store/trunk/cpp/lib/jrnl/jerrno.cpp 2009-01-22 20:26:18 UTC (rev 3069)
@@ -82,7 +82,8 @@
const u_int32_t jerrno::JERR_FCNTL_WRITE = 0x0401;
const u_int32_t jerrno::JERR_FCNTL_CLOSE = 0x0402;
const u_int32_t jerrno::JERR_FCNTL_FILEOFFSOVFL = 0x0403;
-const u_int32_t jerrno::JERR_FCNTL_RDOFFSOVFL = 0x0404;
+const u_int32_t jerrno::JERR_FCNTL_CMPLOFFSOVFL = 0x0404;
+const u_int32_t jerrno::JERR_FCNTL_RDOFFSOVFL = 0x0405;
// class lfmgr
const u_int32_t jerrno::JERR_LFMGR_BADAEFNUMLIM = 0x0500;
@@ -171,6 +172,7 @@
_err_map[JERR_FCNTL_WRITE] = "JERR_FCNTL_WRITE: Unable to write to file.";
_err_map[JERR_FCNTL_CLOSE] = "JERR_FCNTL_CLOSE: File close failed.";
_err_map[JERR_FCNTL_FILEOFFSOVFL] = "JERR_FCNTL_FILEOFFSOVFL: Attempted increase file offset past file size.";
+ _err_map[JERR_FCNTL_CMPLOFFSOVFL] = "JERR_FCNTL_CMPLOFFSOVFL: Attempted increase completed file offset past submitted offset.";
_err_map[JERR_FCNTL_RDOFFSOVFL] = "JERR_FCNTL_RDOFFSOVFL: Attempted increase read offset past write offset.";
// class lfmgr
Modified: store/trunk/cpp/lib/jrnl/jerrno.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jerrno.hpp 2009-01-22 20:13:06 UTC (rev 3068)
+++ store/trunk/cpp/lib/jrnl/jerrno.hpp 2009-01-22 20:26:18 UTC (rev 3069)
@@ -100,6 +100,7 @@
static const u_int32_t JERR_FCNTL_WRITE; ///< Unable to write to file
static const u_int32_t JERR_FCNTL_CLOSE; ///< File close failed
static const u_int32_t JERR_FCNTL_FILEOFFSOVFL; ///< Increased offset past file size
+ static const u_int32_t JERR_FCNTL_CMPLOFFSOVFL; ///< Increased cmpl offs past subm offs
static const u_int32_t JERR_FCNTL_RDOFFSOVFL; ///< Increased read offs past write offs
// class lfmgr
15 years, 11 months