You've already forked mariadb-columnstore-engine
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:
committed by
Leonid Fedorov
parent
e43472aedc
commit
c17f24b90f
@ -287,6 +287,31 @@ int32_t DMLPackageProcessor::tryToRollBackTransaction(uint64_t uniqueId, BRM::Tx
|
||||
return weRc;
|
||||
}
|
||||
|
||||
DMLPackageProcessor::DMLResult DMLPackageProcessor::processPackage(dmlpackage::CalpontDMLPackage& cpackage)
|
||||
{
|
||||
auto result = processPackageInternal(cpackage);
|
||||
uint32_t tries = 0;
|
||||
// Try to setup connection and process package one more time.
|
||||
while ((result.result == PP_LOST_CONNECTION) && (tries < 5))
|
||||
{
|
||||
std::cerr << "DMLPackageProcessor: NETWORK ERROR; attempt # " << tries << std::endl;
|
||||
joblist::ResourceManager* rm = joblist::ResourceManager::instance(true);
|
||||
joblist::DistributedEngineComm* fEc = joblist::DistributedEngineComm::instance(rm);
|
||||
if (fEc->Setup())
|
||||
return result;
|
||||
|
||||
result = processPackageInternal(cpackage);
|
||||
++tries;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool DMLPackageProcessor::checkPPLostConnection(std::exception& ex)
|
||||
{
|
||||
std::string error = ex.what();
|
||||
return error.find(PPLostConnectionErrorCode) != std::string::npos;
|
||||
}
|
||||
|
||||
int DMLPackageProcessor::rollBackTransaction(uint64_t uniqueId, BRM::TxnID txnID, uint32_t sessionID,
|
||||
std::string& errorMsg)
|
||||
{
|
||||
|
Reference in New Issue
Block a user