[rhmessaging-commits] rhmessaging commits: r1377 - in store/trunk/cpp/lib: jrnl and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Nov 27 17:49:31 EST 2007


Author: kpvdr
Date: 2007-11-27 17:49:31 -0500 (Tue, 27 Nov 2007)
New Revision: 1377

Modified:
   store/trunk/cpp/lib/BdbMessageStore.cpp
   store/trunk/cpp/lib/jrnl/jcntl.cpp
   store/trunk/cpp/lib/jrnl/jcntl.hpp
   store/trunk/cpp/lib/jrnl/jerrno.cpp
   store/trunk/cpp/lib/jrnl/jerrno.hpp
   store/trunk/cpp/lib/jrnl/jrec.cpp
   store/trunk/cpp/lib/jrnl/jrec.hpp
   store/trunk/cpp/lib/jrnl/nlfh.cpp
   store/trunk/cpp/lib/jrnl/nlfh.hpp
   store/trunk/cpp/lib/jrnl/rcvdat.hpp
   store/trunk/cpp/lib/jrnl/rrfc.hpp
   store/trunk/cpp/lib/jrnl/wrfc.hpp
Log:
Bugfixes. BZ# 381851,401151,401191. Put mutex across enqueue, dequeue, flush and get_events methods. Placed checks for RID discontinuity into recover to identify overwrite boundary where it coincides with old record.

Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -370,6 +370,7 @@
     IdDbt key;
     Dbt value;
     //read all queues
+    u_int64_t highestRid = 0;
     while (queues.next(key, value)) {
         Buffer buffer(reinterpret_cast<char*>(value.get_data()), value.get_size());
         //create a Queue instance
@@ -385,10 +386,11 @@
 	
 	          try
 	          {
-                  u_int64_t highestRid = 0;
-                  jQueue->recover(prepared, highestRid, key.id); // start recovery
+                  u_int64_t thisHighestRid = 0;
+                  jQueue->recover(prepared, thisHighestRid, key.id); // start recovery
+                  if (thisHighestRid > highestRid)
+                      highestRid = thisHighestRid;
                   recoverMessages(txn, registry, queue, prepared, messages); 
-                  messageIdSequence.reset(highestRid + 1);
 				  jQueue->recover_complete(); // start journal.
 	          } catch (const journal::jexception& e) {
                  THROW_STORE_EXCEPTION(std::string("Queue ") + queueName + ": recoverQueues() failed: " + e.what());
@@ -399,6 +401,7 @@
         queue_index[key.id] = queue;
         maxQueueId = max(key.id, maxQueueId);
     }
+    messageIdSequence.reset(highestRid + 1);
     queueIdSequence.reset(maxQueueId + 1);
 	
 	if (!usingJrnl()) //read all messages: 

Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -141,7 +141,7 @@
         throw jexception(jerrno::JERR_JCNTL_RECOVERJFULL, "jcntl", "recover_complete");
 
 // Debug info, but may be useful to print with a flag
-//_rcvdat.print();
+//_rcvdat.print(_jid);
 
     if (_datafh)
     {
@@ -201,16 +201,33 @@
         const size_t this_data_len, data_tok* dtokp, const bool transient)
         throw (jexception)
 {
+    iores res;
     check_wstatus("enqueue_data_record");
-    return _wmgr.enqueue(data_buff, tot_data_len, this_data_len, dtokp, NULL, 0, transient, false);
+    pthread_mutex_lock(&_mutex);
+    try
+    {
+        res = _wmgr.enqueue(data_buff, tot_data_len, this_data_len, dtokp, NULL, 0, transient,
+                false);
+    }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
+    return res;
 }
 
 const iores
 jcntl::enqueue_extern_data_record(const size_t tot_data_len, data_tok* dtokp, const bool transient)
         throw (jexception)
 {
+    iores res;
     check_wstatus("enqueue_extern_data_record");
-    return _wmgr.enqueue(NULL, tot_data_len, 0, dtokp, NULL, 0, transient, true);
+    pthread_mutex_lock(&_mutex);
+    try
+    {
+        res = _wmgr.enqueue(NULL, tot_data_len, 0, dtokp, NULL, 0, transient, true);
+    }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
+    return res;
 }
 
 const iores
@@ -218,17 +235,33 @@
         const size_t this_data_len, data_tok* dtokp, const std::string& xid,
         const bool transient) throw (jexception)
 {
+    iores res;
     check_wstatus("enqueue_tx_data_record");
-    return _wmgr.enqueue(data_buff, tot_data_len, this_data_len, dtokp, xid.data(), xid.size(),
-            transient, false);
+    pthread_mutex_lock(&_mutex);
+    try
+    {
+        res = _wmgr.enqueue(data_buff, tot_data_len, this_data_len, dtokp, xid.data(), xid.size(),
+                transient, false);
+    }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
+    return res;
 }
 
 const iores
 jcntl::enqueue_extern_txn_data_record(const size_t tot_data_len, data_tok* dtokp,
         const std::string& xid, const bool transient) throw (jexception)
 {
+    iores res;
     check_wstatus("enqueue_extern_txn_data_record");
-    return _wmgr.enqueue(NULL, tot_data_len, 0, dtokp, xid.data(), xid.size(), transient, true);
+    pthread_mutex_lock(&_mutex);
+    try
+    {
+        res = _wmgr.enqueue(NULL, tot_data_len, 0, dtokp, xid.data(), xid.size(), transient, true);
+    }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
+    return res;
 }
 
 const iores
@@ -257,29 +290,49 @@
 const iores
 jcntl::dequeue_data_record(data_tok* const dtokp) throw (jexception)
 {
+    iores res;
     check_wstatus("dequeue_data");
-    return _wmgr.dequeue(dtokp, NULL, 0);
+    pthread_mutex_lock(&_mutex);
+    try { res = _wmgr.dequeue(dtokp, NULL, 0); }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
+    return res;
 }
 
 const iores
 jcntl::dequeue_txn_data_record(data_tok* const dtokp, const std::string& xid) throw (jexception)
 {
+    iores res;
     check_wstatus("dequeue_data");
-    return _wmgr.dequeue(dtokp, xid.data(), xid.size());
+    pthread_mutex_lock(&_mutex);
+    try { res = _wmgr.dequeue(dtokp, xid.data(), xid.size()); }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
+    return res;
 }
 
 const iores
 jcntl::txn_abort(data_tok* const dtokp, const std::string& xid) throw (jexception)
 {
+    iores res;
     check_wstatus("txn_abort");
-    return _wmgr.abort(dtokp, xid.data(), xid.size());
+    pthread_mutex_lock(&_mutex);
+    try { res = _wmgr.abort(dtokp, xid.data(), xid.size()); }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
+    return res;
 }
 
 const iores
 jcntl::txn_commit(data_tok* const dtokp, const std::string& xid) throw (jexception)
 {
+    iores res;
     check_wstatus("txn_commit");
-    return _wmgr.commit(dtokp, xid.data(), xid.size());
+    pthread_mutex_lock(&_mutex);
+    try { res = _wmgr.commit(dtokp, xid.data(), xid.size()); }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
+    return res;
 }
 
 const bool
@@ -291,6 +344,7 @@
 const u_int32_t
 jcntl::get_wr_events() throw (jexception)
 {
+    u_int32_t res;
     int ret = pthread_mutex_trylock(&_mutex);
     if (ret)
     {
@@ -302,7 +356,8 @@
         }
         return 0; // already locked, return immediately
     }
-    u_int32_t res = _wmgr.get_events(pmgr::UNUSED);
+    try { res = _wmgr.get_events(pmgr::UNUSED); }
+    catch (const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
     pthread_mutex_unlock(&_mutex);
     return res;
 }
@@ -336,7 +391,10 @@
         return;
     if (_readonly_flag)
         throw jexception(jerrno::JERR_JCNTL_READONLY, "jcntl", "flush");
-    _wmgr.flush();
+    pthread_mutex_lock(&_mutex);
+    try { _wmgr.flush(); }
+    catch(const std::exception& e) { pthread_mutex_unlock(&_mutex); throw e; }
+    pthread_mutex_unlock(&_mutex);
 }
 
 // Private functions
@@ -446,6 +504,8 @@
     {
         case RHM_JDAT_ENQ_MAGIC:
             {
+                if (!check_rid(fid, h, rd, read_pos))
+                    return false;
                 enq_rec er;
                 while (!done)
                 {
@@ -469,12 +529,12 @@
                         _emap.insert_fid(h._rid, fid);
                 }
 //else std::cout << "t";
-                if (rd._h_rid < h._rid)
-                    rd._h_rid = h._rid;
             }
             break;
         case RHM_JDAT_DEQ_MAGIC:
             {
+                if (!check_rid(fid, h, rd, read_pos))
+                    return false;
                 deq_rec dr;
                 while (!done)
                 {
@@ -512,12 +572,12 @@
                             throw e;
                     }
                 }
-                if (rd._h_rid < h._rid)
-                    rd._h_rid = h._rid;
             }
             break;
         case RHM_JDAT_TXA_MAGIC:
             {
+                if (!check_rid(fid, h, rd, read_pos))
+                    return false;
                 txn_rec ar;
                 while (!done)
                 {
@@ -547,12 +607,12 @@
                         rd._enq_cnt_list[itr->_fid]--;
                 }
                 free(xidp);
-                if (rd._h_rid < h._rid)
-                    rd._h_rid = h._rid;
             }
             break;
         case RHM_JDAT_TXC_MAGIC:
             {
+                if (!check_rid(fid, h, rd, read_pos))
+                    return false;
                 txn_rec cr;
                 while (!done)
                 {
@@ -578,8 +638,6 @@
                 }
 				
                 free(xidp);
-                if (rd._h_rid < h._rid)
-                    rd._h_rid = h._rid;
             }
             break;
         case RHM_JDAT_EMPTY_MAGIC:
@@ -595,6 +653,13 @@
             rd._eo = ifsp->tellg();
             return false;
         default:
+            // Is this the last file, if so, stop as this is the overwrite boundary.
+            if (fid == (rd._ffid ? rd._ffid - 1 : JRNL_NUM_FILES - 1))
+            {
+                rd._lfid = fid;
+                rd._eo = read_pos;
+                return false;
+            }
             std::stringstream ss;
             ss << std::hex << std::setfill('0') << "Magic=0x" << std::setw(8) << h._magic;
             ss << " fid=" << fid << " foffs=0x" << std::setw(8) << read_pos;
@@ -649,6 +714,28 @@
     }
     return true;
 }
+        
+const bool
+jcntl::check_rid(u_int16_t fid, hdr& h, rcvdat& rd, std::streampos read_pos) throw (jexception)
+{
+    if (rd._h_rid && rd._h_rid >= h._rid)
+    {
+        if (fid == (rd._ffid ? rd._ffid - 1 : JRNL_NUM_FILES - 1))
+        {
+            rd._lfid = fid;
+            rd._eo = read_pos;
+            return false;
+        }
+        std::stringstream ss;
+        ss << std::hex << std::setfill('0') << "Magic=0x" << std::setw(8) << h._magic;
+        ss << " fid=" << fid << " rid=" << h._rid << " hrid=" << rd._h_rid;
+        ss << " foffs=0x" << std::setw(8) << read_pos;
+        throw jexception(jerrno::JERR_JCNTL_RIDORDERBAD, ss.str().c_str(), "jcntl",
+                "check_rid");
+    }   
+    rd._h_rid = h._rid;
+    return true;
+}
 
 void
 jcntl::aio_wr_callback(jcntl*  journal, u_int32_t num_dtoks)

Modified: store/trunk/cpp/lib/jrnl/jcntl.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.hpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/jcntl.hpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -640,6 +640,10 @@
 
         const bool jfile_cycle(u_int16_t& fid, std::ifstream* ifsp, rcvdat& rd,
                 const bool jump_fro);
+        
+        const bool check_rid(u_int16_t fid, hdr& h, rcvdat& rd, std::streampos read_pos)
+                throw (jexception);
+
         /**
         * \brief Analyze a particular journal file for recovery.
         *

Modified: store/trunk/cpp/lib/jrnl/jerrno.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jerrno.cpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/jerrno.cpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -59,6 +59,7 @@
 const u_int32_t jerrno::JERR_JCNTL_UNKNOWNMAGIC = 0x0203;
 const u_int32_t jerrno::JERR_JCNTL_NOTRECOVERED = 0x0204;
 const u_int32_t jerrno::JERR_JCNTL_RECOVERJFULL = 0x0205;
+const u_int32_t jerrno::JERR_JCNTL_RIDORDERBAD  = 0x0206;
 
 // class jdir
 const u_int32_t jerrno::JERR_JDIR_NOTDIR        = 0x0300;
@@ -142,6 +143,8 @@
             "Operation requires recover() to be run first.";
     _err_map[JERR_JCNTL_RECOVERJFULL] = "JERR_JCNTL_RECOVERJFULL: "
             "Journal data files full, cannot write.";
+    _err_map[JERR_JCNTL_RIDORDERBAD] = "JERR_JCNTL_RIDORDERBAD: "
+            "Record found with RID out-of-order.";
 
     // class jdir
     _err_map[JERR_JDIR_NOTDIR] = "JERR_JDIR_NOTDIR: Directory name exists but is not a directory.";

Modified: store/trunk/cpp/lib/jrnl/jerrno.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jerrno.hpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/jerrno.hpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -76,6 +76,7 @@
         static const u_int32_t JERR_JCNTL_UNKNOWNMAGIC; ///< Found record with unknown magic
         static const u_int32_t JERR_JCNTL_NOTRECOVERED; ///< Req' recover() to be called first
         static const u_int32_t JERR_JCNTL_RECOVERJFULL; ///< Journal data files full, cannot write
+        static const u_int32_t JERR_JCNTL_RIDORDERBAD;  ///< RID out-of-order
 
         // class jdir
         static const u_int32_t JERR_JDIR_NOTDIR;        ///< Exists but is not a directory

Modified: store/trunk/cpp/lib/jrnl/jrec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jrec.cpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/jrec.cpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -45,24 +45,6 @@
 jrec::jrec() {}
 jrec::~jrec() {}
 
-const u_int32_t
-jrec::size_dblks(const size_t size)
-{
-    return size_blks(size, JRNL_DBLK_SIZE);
-}
-
-const u_int32_t
-jrec::size_sblks(const size_t size)
-{
-    return size_blks(size, JRNL_DBLK_SIZE * JRNL_SBLK_SIZE);
-}
-
-const u_int32_t
-jrec::size_blks(const size_t size, const size_t blksize)
-{
-    return (size + blksize - 1)/blksize;
-}
-
 void
 jrec::chk_hdr(const hdr& hdr) throw (jexception)
 {

Modified: store/trunk/cpp/lib/jrnl/jrec.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jrec.hpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/jrec.hpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -158,9 +158,12 @@
         virtual const size_t xid_size() const = 0;
         virtual const size_t rec_size() const = 0;
         inline virtual const u_int32_t rec_size_dblks() const { return size_dblks(rec_size()); }
-        static const u_int32_t size_dblks(const size_t size);
-        static const u_int32_t size_sblks(const size_t size);
-        static const u_int32_t size_blks(const size_t size, const size_t blksize);
+        static inline const u_int32_t size_dblks(const size_t size)
+                { return size_blks(size, JRNL_DBLK_SIZE); }
+        static inline const u_int32_t size_sblks(const size_t size)
+                { return size_blks(size, JRNL_DBLK_SIZE * JRNL_SBLK_SIZE); }
+        static inline const u_int32_t size_blks(const size_t size, const size_t blksize)
+                { return (size + blksize - 1)/blksize; }
 
     protected:
         virtual void chk_hdr() const throw (jexception) = 0;

Modified: store/trunk/cpp/lib/jrnl/nlfh.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/nlfh.cpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/nlfh.cpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -255,20 +255,6 @@
 }
 
 const u_int32_t
-nlfh::incr_rd_subm_cnt_dblks() throw (jexception)
-{
-    if (_rd_subm_cnt_dblks >= _wr_subm_cnt_dblks)
-    {
-        std::stringstream ss;
-        ss << "_rd_subm_cnt_dblks=" << _rd_subm_cnt_dblks;
-        ss << " _wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks;
-        throw jexception(jerrno::JERR_NFLH_RDOFFSOVFL, ss.str().c_str(), "nlfh",
-                "incr_rd_subm_cnt_dblks");
-    }
-    return ++_rd_subm_cnt_dblks;
-}
-
-const u_int32_t
 nlfh::add_rd_subm_cnt_dblks(u_int32_t a) throw (jexception)
 {
     if (_rd_subm_cnt_dblks + a > _wr_subm_cnt_dblks)
@@ -284,20 +270,6 @@
 }
 
 const u_int32_t
-nlfh::incr_rd_cmpl_cnt_dblks() throw (jexception)
-{
-    if (_rd_cmpl_cnt_dblks >= _rd_subm_cnt_dblks)
-    {
-        std::stringstream ss;
-        ss << "_rd_cmpl_cnt_dblks=" << _rd_cmpl_cnt_dblks;
-        ss << " _rd_subm_cnt_dblks=" << _rd_subm_cnt_dblks;
-        throw jexception(jerrno::JERR_NFLH_CMPLOFFSOVFL, ss.str().c_str(), "nlfh",
-                "incr_rd_cmpl_cnt_dblks");
-    }
-    return ++_rd_cmpl_cnt_dblks;
-}
-
-const u_int32_t
 nlfh::add_rd_cmpl_cnt_dblks(u_int32_t a) throw (jexception)
 {
     if (_rd_cmpl_cnt_dblks + a > _rd_subm_cnt_dblks)
@@ -313,20 +285,6 @@
 }
 
 const u_int32_t
-nlfh::incr_wr_subm_cnt_dblks() throw (jexception)
-{
-    if (_wr_subm_cnt_dblks + 1 > JRNL_SBLK_SIZE * (JRNL_FILE_SIZE + 1)) // Allow for file header
-    {
-        std::stringstream ss;
-        ss << "_wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks;
-        ss << " fsize=" << JRNL_SBLK_SIZE * (JRNL_FILE_SIZE + 1) << " dblks";
-        throw jexception(jerrno::JERR_NLFH_FILEOFFSOVFL, ss.str().c_str(), "nlfh",
-                "incr_wr_subm_cnt_dblks");
-    }
-    return ++_wr_subm_cnt_dblks;
-}
-
-const u_int32_t
 nlfh::add_wr_subm_cnt_dblks(u_int32_t a) throw (jexception)
 {
     if (_wr_subm_cnt_dblks + a > JRNL_SBLK_SIZE * (JRNL_FILE_SIZE + 1)) // Allow for file header
@@ -342,20 +300,6 @@
 }
 
 const u_int32_t
-nlfh::incr_wr_cmpl_cnt_dblks() throw (jexception)
-{
-    if (_wr_cmpl_cnt_dblks >= _wr_subm_cnt_dblks)
-    {
-        std::stringstream ss;
-        ss << "_wr_cmpl_cnt_dblks=" << _wr_cmpl_cnt_dblks;
-        ss << " _wr_subm_cnt_dblks=" << _wr_subm_cnt_dblks;
-        throw jexception(jerrno::JERR_NFLH_CMPLOFFSOVFL, ss.str().c_str(), "nlfh",
-                "incr_wr_cmpl_cnt_dblks");
-    }
-    return ++_wr_cmpl_cnt_dblks;
-}
-
-const u_int32_t
 nlfh::add_wr_cmpl_cnt_dblks(u_int32_t a) throw (jexception)
 {
     if (_wr_cmpl_cnt_dblks + a > _wr_subm_cnt_dblks)

Modified: store/trunk/cpp/lib/jrnl/nlfh.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/nlfh.hpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/nlfh.hpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -92,22 +92,18 @@
 
         inline const u_int32_t rd_subm_cnt_dblks() const { return _rd_subm_cnt_dblks; }
         inline const size_t rd_subm_offs() const { return _rd_subm_cnt_dblks * JRNL_DBLK_SIZE; }
-        const u_int32_t incr_rd_subm_cnt_dblks() throw (jexception);
         const u_int32_t add_rd_subm_cnt_dblks(u_int32_t a) throw (jexception);
 
         inline const u_int32_t rd_cmpl_cnt_dblks() const { return _rd_cmpl_cnt_dblks; }
         inline const size_t rd_cmpl_offs() const { return _rd_cmpl_cnt_dblks * JRNL_DBLK_SIZE; }
-        const u_int32_t incr_rd_cmpl_cnt_dblks() throw (jexception);
         const u_int32_t add_rd_cmpl_cnt_dblks(u_int32_t a) throw (jexception);
 
         inline const u_int32_t wr_subm_cnt_dblks() const { return _wr_subm_cnt_dblks; }
         inline const size_t wr_subm_offs() const { return _wr_subm_cnt_dblks * JRNL_DBLK_SIZE; }
-        const u_int32_t incr_wr_subm_cnt_dblks() throw (jexception);
         const u_int32_t add_wr_subm_cnt_dblks(u_int32_t a) throw (jexception);
 
         inline const u_int32_t wr_cmpl_cnt_dblks() const { return _wr_cmpl_cnt_dblks; }
         inline const size_t wr_cmpl_offs() const { return _wr_cmpl_cnt_dblks * JRNL_DBLK_SIZE; }
-        const u_int32_t incr_wr_cmpl_cnt_dblks() throw (jexception);
         const u_int32_t add_wr_cmpl_cnt_dblks(u_int32_t a) throw (jexception);
 
         // Derived helper functions

Modified: store/trunk/cpp/lib/jrnl/rcvdat.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rcvdat.hpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/rcvdat.hpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -75,9 +75,9 @@
                     _enq_cnt_list[f] = 0;
             }
 
-            void print()
+            void print(std::string& jid)
             {
-                std::cout << "Recovery jorunal file analysis summary:" << std::endl;
+                std::cout << "Jorunal file analysis (jid=\"" << jid << "\"):" << std::endl;
                 std::cout << "  Journal empty (_empty) = " << (_empty ? "TRUE" : "FALSE") <<
                         std::endl;
                 std::cout << "  First fid (_ffid) = " << _ffid << std::endl;

Modified: store/trunk/cpp/lib/jrnl/rrfc.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rrfc.hpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/rrfc.hpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -114,15 +114,11 @@
 
         inline const u_int32_t subm_cnt_dblks() const { return _curr_fh->rd_subm_cnt_dblks(); }
         inline const size_t subm_offs() const { return _curr_fh->rd_subm_offs(); }
-        inline const u_int32_t incr_subm_cnt_dblks() throw (jexception)
-                { return _curr_fh->incr_rd_subm_cnt_dblks(); }
         inline const u_int32_t add_subm_cnt_dblks(u_int32_t a) throw (jexception)
                 { return _curr_fh->add_rd_subm_cnt_dblks(a); }
 
         inline const u_int32_t cmpl_cnt_dblks() const { return _curr_fh->rd_cmpl_cnt_dblks(); }
         inline const size_t cmpl_offs() const { return _curr_fh->rd_cmpl_offs(); }
-        inline const u_int32_t incr_cmpl_cnt_dblks() throw (jexception)
-                { return _curr_fh->incr_rd_cmpl_cnt_dblks(); }
         inline const u_int32_t add_cmpl_cnt_dblks(u_int32_t a) throw (jexception)
                 { return _curr_fh->add_rd_cmpl_cnt_dblks(a); }
 

Modified: store/trunk/cpp/lib/jrnl/wrfc.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wrfc.hpp	2007-11-27 22:18:07 UTC (rev 1376)
+++ store/trunk/cpp/lib/jrnl/wrfc.hpp	2007-11-27 22:49:31 UTC (rev 1377)
@@ -89,15 +89,11 @@
 
         inline const u_int32_t subm_cnt_dblks() const { return _curr_fh->wr_subm_cnt_dblks(); }
         inline const size_t subm_offs() const { return _curr_fh->wr_subm_offs(); }
-        inline const u_int32_t incr_subm_cnt_dblks() throw (jexception)
-                { return _curr_fh->incr_wr_subm_cnt_dblks(); }
         inline const u_int32_t add_subm_cnt_dblks(u_int32_t a) throw (jexception)
                 { return _curr_fh->add_wr_subm_cnt_dblks(a); }
 
         inline const u_int32_t cmpl_cnt_dblks() const { return _curr_fh->wr_cmpl_cnt_dblks(); }
         inline const size_t cmpl_offs() const { return _curr_fh->wr_cmpl_offs(); }
-        inline const u_int32_t incr_cmpl_cnt_dblks() throw (jexception)
-                { return _curr_fh->incr_wr_cmpl_cnt_dblks(); }
         inline const u_int32_t add_cmpl_cnt_dblks(u_int32_t a) throw (jexception)
                 { return _curr_fh->add_wr_cmpl_cnt_dblks(a); }
 




More information about the rhmessaging-commits mailing list