diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2014-02-05 18:49:32 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2014-02-05 18:49:32 +0000 |
| commit | 4c26c985409d4327a537d40e966aee3b2492b285 (patch) | |
| tree | 78f160c3aeeeb818b0b6fe74a9ff4f5b85c8363f /cpp/src/qpid/linearstore/MessageStoreImpl.cpp | |
| parent | 03feca4761cec442ca810a212cfd88278bcc44bb (diff) | |
| download | qpid-python-4c26c985409d4327a537d40e966aee3b2492b285.tar.gz | |
QPID-5480: Recovery of store failure with "JERR_MAP_NOTFOUND: Key not found in map." error message. Fixed numerous recovery issues, particularly the handling of files at the end of the file list during recovery when the last file is not used or incompletely written.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1564877 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/linearstore/MessageStoreImpl.cpp')
| -rw-r--r-- | cpp/src/qpid/linearstore/MessageStoreImpl.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/cpp/src/qpid/linearstore/MessageStoreImpl.cpp b/cpp/src/qpid/linearstore/MessageStoreImpl.cpp index 483b494c2c..ff5b41b962 100644 --- a/cpp/src/qpid/linearstore/MessageStoreImpl.cpp +++ b/cpp/src/qpid/linearstore/MessageStoreImpl.cpp @@ -593,7 +593,7 @@ void MessageStoreImpl::recover(qpid::broker::RecoveryManager& registry_) std::ostringstream oss; oss << "Recovered transaction prepared list:"; for (txn_list::iterator i = prepared.begin(); i != prepared.end(); i++) { - oss << std::endl << " " << str2hexnum(i->xid); + oss << std::endl << " " << qpid::linearstore::journal::jcntl::str2hexnum(i->xid); } QLS_LOG(debug, oss.str()); @@ -1292,7 +1292,7 @@ void MessageStoreImpl::completed(TxnCtxt& txn_, mgmtObject->inc_tplTxnAborts(); } } catch (const std::exception& e) { - QLS_LOG(error, "Error completing xid " << txn_.getXid() << ": " << e.what()); + QLS_LOG(error, "Error completing xid " << qpid::linearstore::journal::jcntl::str2hexnum(txn_.getXid()) << ": " << e.what()); throw; } } @@ -1516,15 +1516,6 @@ void MessageStoreImpl::journalDeleted(JournalImpl& j_) { journalList.erase(j_.id()); } -std::string MessageStoreImpl::str2hexnum(const std::string& str) { - std::ostringstream oss; - oss << "(" << str.size() << ")0x" << std::hex; - for (unsigned i=str.size(); i>0; --i) { - oss << std::setfill('0') << std::setw(2) << (uint16_t)(uint8_t)str[i-1]; - } - return oss.str(); -} - MessageStoreImpl::StoreOptions::StoreOptions(const std::string& name_) : qpid::Options(name_), truncateFlag(defTruncateFlag), |
