1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

fix(logging): MCOL-5789 Add logs on failure. (#3307)

This commit is contained in:
Denis Khalikov
2024-09-10 17:43:25 +03:00
committed by GitHub
parent ddbdb97071
commit 9e9ac32879
2 changed files with 10 additions and 2 deletions

View File

@ -3198,7 +3198,11 @@ void DBRM::rolledback(TxnID& txnid)
if (tmp != ERR_OK) if (tmp != ERR_OK)
{ {
if (getSystemReady() != 0) if (getSystemReady() != 0)
log("DBRM: error: SessionManager::rolledback() failed (valid error code)", logging::LOG_TYPE_ERROR); {
std::stringstream errorStream;
errorStream << "DBRM: error: SessionManager::rolledback() failed (error code " << tmp << ")";
log(errorStream.str(), logging::LOG_TYPE_ERROR);
}
} }
} }

View File

@ -1633,8 +1633,12 @@ void MasterDBRMNode::doRolledBack(ByteStream& msg, ThreadParams* p)
#endif #endif
sm.rolledback(txnid); sm.rolledback(txnid);
} }
catch (exception&) catch (exception& ex)
{ {
ostringstream errStream;
errStream << "doRolledBack() failed: " << ex.what();
log(errStream.str());
reply << (uint8_t)ERR_FAILURE; reply << (uint8_t)ERR_FAILURE;
try try