diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2013-12-23 16:57:56 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2013-12-23 16:57:56 +0000 |
| commit | 8597d81514c55bcc31b681d667b8ec12064b1ec9 (patch) | |
| tree | bf16acbe772c539563ebf2fc3768f0e22d25a8e6 /qpid/cpp/src | |
| parent | e4a6cc2fdd47884582cbec40a3c1116c35a5a75e (diff) | |
| download | qpid-python-8597d81514c55bcc31b681d667b8ec12064b1ec9.tar.gz | |
QPID-5444: Recovering from qpid-txtest fails with "Inconsisntent TPL 2PC count" error message
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1553148 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/linearstore/ISSUES | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp | 6 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/linearstore/journal/RecoveryManager.cpp | 4 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/linearstore/journal/txn_map.h | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/qpid/linearstore/journal/wmgr.cpp | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/qpid/cpp/src/qpid/linearstore/ISSUES b/qpid/cpp/src/qpid/linearstore/ISSUES index deeefb31fe..7132a1f4c9 100644 --- a/qpid/cpp/src/qpid/linearstore/ISSUES +++ b/qpid/cpp/src/qpid/linearstore/ISSUES @@ -59,7 +59,7 @@ Current bugs and performance issues: 5. (UNABLE TO REPRODUCE) BZ 1038599 - Abort when deleting used queue after restart - may be dup of QPID-5387 (BZ 1036071) 6. BZ 1039522 - Crash during recovery - JournalFile::getFqFileName() -JERR_JREC_BADRECTAIL 6. BZ 1039525 - Crash during recovery - journal::jexception - JERR_JREC_BADRECTAIL -7. QPID-5442 (BZ 1039949) - DTX test failure - missing XIDs +7. (FIXED) QPID-5442 (BZ 1039949) - DTX test failure - missing XIDs Code tidy-up ------------ diff --git a/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp b/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp index dd4198c6fd..ca71d1b780 100644 --- a/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp +++ b/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp @@ -641,7 +641,7 @@ void MessageStoreImpl::recover(qpid::broker::RecoveryManager& registry_) ++tpcCnt; } } - if (tpcCnt > 0 && tpcCnt != tdl.size()) THROW_STORE_EXCEPTION("Inconsistent TPL 2PC count"); + if (tpcCnt > 0 && tpcCnt != tdl.size()) THROW_STORE_EXCEPTION("MessageStoreImpl::recover(): Inconsistent TPL 2PC count"); bool commitFlag = abortCnt == 0; // If a record is found that is dequeued but not committed/aborted from tplStore, then a complete() call @@ -963,7 +963,7 @@ void MessageStoreImpl::recoverMessages(TxnCtxt& /*txn*/, ++tpcCnt; } } - if (tpcCnt > 0 && tpcCnt != tdl.size()) THROW_STORE_EXCEPTION("Inconsistent TPL 2PC count"); + if (tpcCnt > 0 && tpcCnt != tdl.size()) THROW_STORE_EXCEPTION("MessageStoreImpl::recoverMessages(): Inconsistent TPL 2PC count"); if (deqCnt > 0 || tpcCnt == 0) { if (jc->is_enqueued(rid, true)) { // Enqueue is non-tx, dequeue tx @@ -1120,7 +1120,7 @@ void MessageStoreImpl::collectPreparedXids(std::set<std::string>& xids) } } if (tpcCnt > 0) { - if (tpcCnt != tdl.size()) THROW_STORE_EXCEPTION("Inconsistent TPL 2PC count"); + if (tpcCnt != tdl.size()) THROW_STORE_EXCEPTION("MessageStoreImpl::collectPreparedXids: Inconsistent TPL 2PC count"); if (enqCnt - deqCnt > 0) { xids.insert(*i); } diff --git a/qpid/cpp/src/qpid/linearstore/journal/RecoveryManager.cpp b/qpid/cpp/src/qpid/linearstore/journal/RecoveryManager.cpp index 16ca1e0994..6050d6e899 100644 --- a/qpid/cpp/src/qpid/linearstore/journal/RecoveryManager.cpp +++ b/qpid/cpp/src/qpid/linearstore/journal/RecoveryManager.cpp @@ -598,7 +598,7 @@ bool RecoveryManager::getNextRecordHeader() throw jexception(jerrno::JERR_RCVM_NULLXID, "ENQ", "RecoveryManager", "getNextRecordHeader"); } std::string xid((char*)xidp, er.xid_size()); - transactionMapRef_.insert_txn_data(xid, txn_data_t(h._rid, 0, start_fid, file_pos, true, false /*tpcFlag*/)); + transactionMapRef_.insert_txn_data(xid, txn_data_t(h._rid, 0, start_fid, file_pos, true, false, false)); if (transactionMapRef_.set_aio_compl(xid, h._rid) < txn_map::TMAP_OK) { // fail - xid or rid not found std::ostringstream oss; oss << std::hex << "_tmap.set_aio_compl: txn_enq xid=\"" << xid << "\" rid=0x" << h._rid; @@ -637,7 +637,7 @@ bool RecoveryManager::getNextRecordHeader() } std::string xid((char*)xidp, dr.xid_size()); transactionMapRef_.insert_txn_data(xid, txn_data_t(dr.rid(), dr.deq_rid(), start_fid, file_pos, - false, dr.is_txn_coml_commit())); + false, false, dr.is_txn_coml_commit())); if (transactionMapRef_.set_aio_compl(xid, dr.rid()) < txn_map::TMAP_OK) { // fail - xid or rid not found std::ostringstream oss; oss << std::hex << "_tmap.set_aio_compl: txn_deq xid=\"" << xid << "\" rid=0x" << dr.rid(); diff --git a/qpid/cpp/src/qpid/linearstore/journal/txn_map.h b/qpid/cpp/src/qpid/linearstore/journal/txn_map.h index e2df6c7d0e..a99f9170c7 100644 --- a/qpid/cpp/src/qpid/linearstore/journal/txn_map.h +++ b/qpid/cpp/src/qpid/linearstore/journal/txn_map.h @@ -51,7 +51,7 @@ namespace journal { const uint64_t foffs, const bool enq_flag, const bool tpc_flag, - const bool commit_flag = false); + const bool commit_flag); } txn_data_t; typedef std::vector<txn_data_t> txn_data_list; typedef txn_data_list::iterator tdl_itr; diff --git a/qpid/cpp/src/qpid/linearstore/journal/wmgr.cpp b/qpid/cpp/src/qpid/linearstore/journal/wmgr.cpp index 403ad68922..78e1cc599c 100644 --- a/qpid/cpp/src/qpid/linearstore/journal/wmgr.cpp +++ b/qpid/cpp/src/qpid/linearstore/journal/wmgr.cpp @@ -197,7 +197,7 @@ wmgr::enqueue(const void* const data_buff, if (xid_len) // If part of transaction, add to transaction map { std::string xid((const char*)xid_ptr, xid_len); - _tmap.insert_txn_data(xid, txn_data_t(rid, 0, dtokp->fid(), 0, true, tpc_flag)); + _tmap.insert_txn_data(xid, txn_data_t(rid, 0, dtokp->fid(), 0, true, tpc_flag, false)); } else { @@ -314,7 +314,7 @@ wmgr::dequeue(data_tok* dtokp, // If the enqueue is part of a pending txn, it will not yet be in emap _emap.lock(dequeue_rid); // ignore rid not found error std::string xid((const char*)xid_ptr, xid_len); - _tmap.insert_txn_data(xid, txn_data_t(rid, dequeue_rid, dtokp->fid(), 0, false, tpc_flag)); + _tmap.insert_txn_data(xid, txn_data_t(rid, dequeue_rid, dtokp->fid(), 0, false, tpc_flag, false)); } else { |
