1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-5352 Properly handle PP restart for DML/DDL operations.

This commit is contained in:
Denis Khalikov
2024-02-01 13:27:01 +00:00
committed by Leonid Fedorov
parent e43472aedc
commit c17f24b90f
31 changed files with 736 additions and 401 deletions

View File

@ -61,7 +61,8 @@ using namespace oam;
namespace dmlpackageprocessor
{
// StopWatch timer;
DMLPackageProcessor::DMLResult UpdatePackageProcessor::processPackage(dmlpackage::CalpontDMLPackage& cpackage)
DMLPackageProcessor::DMLResult UpdatePackageProcessor::processPackageInternal(
dmlpackage::CalpontDMLPackage& cpackage)
{
SUMMARY_INFO("UpdatePackageProcessor::processPackage");
@ -201,7 +202,6 @@ DMLPackageProcessor::DMLResult UpdatePackageProcessor::processPackage(dmlpackage
abs_ts.tv_nsec = rm_ts.tv_nsec;
} while (nanosleep(&abs_ts, &rm_ts) < 0);
try
{
processID = ::getpid();
@ -301,22 +301,28 @@ DMLPackageProcessor::DMLResult UpdatePackageProcessor::processPackage(dmlpackage
}
catch (std::exception& ex)
{
cerr << "UpdatePackageProcessor::processPackage:" << ex.what() << endl;
if (result.result == 0)
if (checkPPLostConnection(ex))
{
result.result = UPDATE_ERROR;
result.result = PP_LOST_CONNECTION;
}
else
{
cerr << "UpdatePackageProcessor::processPackage:" << ex.what() << endl;
if (result.result == 0)
{
result.result = UPDATE_ERROR;
}
result.message = Message(ex.what());
result.rowCount = 0;
LoggingID logid(DMLLoggingId, fSessionID, txnid.id);
logging::Message::Args args1;
logging::Message msg(1);
args1.add("End SQL statement with error");
msg.format(args1);
logging::Logger logger(logid.fSubsysID);
logger.logMessage(LOG_TYPE_DEBUG, msg, logid);
result.message = Message(ex.what());
result.rowCount = 0;
LoggingID logid(DMLLoggingId, fSessionID, txnid.id);
logging::Message::Args args1;
logging::Message msg(1);
args1.add("End SQL statement with error");
msg.format(args1);
logging::Logger logger(logid.fSubsysID);
logger.logMessage(LOG_TYPE_DEBUG, msg, logid);
}
}
catch (...)
{