[rhmessaging-commits] rhmessaging commits: r3060 - store/trunk/cpp/lib/jrnl.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Wed Jan 21 10:42:30 EST 2009


Author: kpvdr
Date: 2009-01-21 10:42:30 -0500 (Wed, 21 Jan 2009)
New Revision: 3060

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:
Possible fix for BZ 480964 - "JERR_FCNTL_CMPLOFFSOVFL during flow-to-disk". Checks for fcntl::add_rd_cmpl_cnt_dblks() and fcntl::add_wr_cmpl_cnt_dblks() exceeding their corresponding submit counts were removed.

Modified: store/trunk/cpp/lib/jrnl/fcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/fcntl.cpp	2009-01-21 14:58:32 UTC (rev 3059)
+++ store/trunk/cpp/lib/jrnl/fcntl.cpp	2009-01-21 15:42:30 UTC (rev 3060)
@@ -186,20 +186,6 @@
 }
 
 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
@@ -213,20 +199,6 @@
     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-21 14:58:32 UTC (rev 3059)
+++ store/trunk/cpp/lib/jrnl/fcntl.hpp	2009-01-21 15:42:30 UTC (rev 3060)
@@ -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; }
-        u_int32_t add_rd_cmpl_cnt_dblks(u_int32_t a);
+        inline u_int32_t add_rd_cmpl_cnt_dblks(u_int32_t a) { _rd_cmpl_cnt_dblks += a; return _rd_cmpl_cnt_dblks; }
 
         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; }
-        u_int32_t add_wr_cmpl_cnt_dblks(u_int32_t a);
+        inline u_int32_t add_wr_cmpl_cnt_dblks(u_int32_t a) { _wr_cmpl_cnt_dblks += a; return _wr_cmpl_cnt_dblks; }
 
         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-21 14:58:32 UTC (rev 3059)
+++ store/trunk/cpp/lib/jrnl/jerrno.cpp	2009-01-21 15:42:30 UTC (rev 3060)
@@ -82,8 +82,7 @@
 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_CMPLOFFSOVFL = 0x0404;
-const u_int32_t jerrno::JERR_FCNTL_RDOFFSOVFL   = 0x0405;
+const u_int32_t jerrno::JERR_FCNTL_RDOFFSOVFL   = 0x0404;
 
 // class lfmgr
 const u_int32_t jerrno::JERR_LFMGR_BADAEFNUMLIM = 0x0500;
@@ -172,7 +171,6 @@
     _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-21 14:58:32 UTC (rev 3059)
+++ store/trunk/cpp/lib/jrnl/jerrno.hpp	2009-01-21 15:42:30 UTC (rev 3060)
@@ -100,7 +100,6 @@
         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




More information about the rhmessaging-commits mailing list