[rhmessaging-commits] rhmessaging commits: r2325 - store/branches/mrg-1.0/cpp/lib/jrnl.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue Aug 19 15:38:53 EDT 2008


Author: kpvdr
Date: 2008-08-19 15:38:53 -0400 (Tue, 19 Aug 2008)
New Revision: 2325

Modified:
   store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp
   store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.hpp
Log:
Minor tidy-up of misbehaving log entry for xids, added missing doxygen entry for extra param

Modified: store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp	2008-08-19 18:57:33 UTC (rev 2324)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.cpp	2008-08-19 19:38:53 UTC (rev 2325)
@@ -1048,7 +1048,16 @@
     assert(!ofs.fail());
     // log write action
     std::ostringstream oss;
-    oss << "Recover phase write: Aborted unprepared transaction xid=" << xid << " at offs=0x" << std::hex << file_pos << std::dec;
+    oss << std::hex << std::setfill('0') << "Recover phase write: Aborted unprepared transaction xid=\"";
+    for (std::size_t i=0; i<xid.size(); i++)
+    {
+        int c = xid.at(i);
+        if (std::isprint(c))
+            oss << (char)c;
+        else 
+            oss << "\\x" << std::setw(2) << c;
+    }
+    oss << "\" at offs=0x" << file_pos;
     this->log(LOG_NOTICE, oss.str());
     file_pos = ofs.tellp();
 

Modified: store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.hpp
===================================================================
--- store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.hpp	2008-08-19 18:57:33 UTC (rev 2324)
+++ store/branches/mrg-1.0/cpp/lib/jrnl/jcntl.hpp	2008-08-19 19:38:53 UTC (rev 2325)
@@ -411,6 +411,11 @@
         *     NOTE: If there is an xid, then xidpp must be freed.
         * \param dtokp Pointer to data_tok instance for this data, used to track state of data
         *     through journal.
+        * \param ignore_pending_txns When false (default), if the next record to be read is locked
+        *     by a pending transaction, the read fails with RHM_IORES_TXPENDING. However, if set
+        *     to true, then locks are ignored. This is required for reading of the Transaction
+        *     Prepared List (TPL) which may have its entries locked, but may be read from
+        *     time-to-time, and needs all its records (locked and unlocked) to be available.
         *
         * \exception TODO
         */




More information about the rhmessaging-commits mailing list