Author: kpvdr
Date: 2009-01-12 11:58:29 -0500 (Mon, 12 Jan 2009)
New Revision: 3038
Modified:
store/trunk/cpp/lib/jrnl/jcntl.cpp
Log:
Fix for BZ479714 - "qpidd+store message loss (detected by txtest --check yes after
qpidd recovery)".
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2009-01-08 21:28:26 UTC (rev 3037)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2009-01-12 16:58:29 UTC (rev 3038)
@@ -680,28 +680,30 @@
case RHM_JDAT_ENQ_MAGIC:
{
enq_rec er;
+ u_int16_t start_fid = fid; // fid may increment in decode() if record
folds over file boundary
if (!decode(er, fid, ifsp, cum_size_read, h, lowi, rd, file_pos))
return false;
if (!er.is_transient()) // Ignore transient msgs
{
- rd._enq_cnt_list[fid]++;
+ rd._enq_cnt_list[start_fid]++;
if (er.xid_size())
{
er.get_xid(&xidp);
assert(xidp != 0);
std::string xid((char*)xidp, er.xid_size());
- _tmap.insert_txn_data(xid, txn_data(h._rid, 0, fid, true));
+ _tmap.insert_txn_data(xid, txn_data(h._rid, 0, start_fid,
true));
_tmap.set_aio_compl(xid, h._rid);
std::free(xidp);
}
else
- _emap.insert_fid(h._rid, fid);
+ _emap.insert_fid(h._rid, start_fid);
}
}
break;
case RHM_JDAT_DEQ_MAGIC:
{
deq_rec dr;
+ u_int16_t start_fid = fid; // fid may increment in decode() if record
folds over file boundary
if (!decode(dr, fid, ifsp, cum_size_read, h, lowi, rd, file_pos))
return false;
if (dr.xid_size())
@@ -715,7 +717,7 @@
dr.get_xid(&xidp);
assert(xidp != 0);
std::string xid((char*)xidp, dr.xid_size());
- _tmap.insert_txn_data(xid, txn_data(dr.rid(), dr.deq_rid(), fid,
false,
+ _tmap.insert_txn_data(xid, txn_data(dr.rid(), dr.deq_rid(),
start_fid, false,
dr.is_txn_coml_commit()));
_tmap.set_aio_compl(xid, dr.rid());
std::free(xidp);