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-5263 Add support to ROLLBACK when PP were restarted.
DMLProc starts ROLLBACK when SELECT part of UPDATE fails b/c EM facility in PP were restarted. Unfortunately this ROLLBACK stuck if EM/PP are not yet available. DMLProc must have a t/o with re-try doing ROLLBACK.
This commit is contained in:
@ -266,6 +266,27 @@ int DMLPackageProcessor::commitTransaction(uint64_t uniqueId, BRM::TxnID txnID)
|
||||
return rc;
|
||||
}
|
||||
|
||||
// Tries to rollback transaction, if network error tries one more time
|
||||
// MCOL-5263.
|
||||
int32_t DMLPackageProcessor::tryToRollBackTransaction(uint64_t uniqueId, BRM::TxnID txnID, uint32_t sessionID,
|
||||
string& errorMsg)
|
||||
{
|
||||
auto weRc = rollBackTransaction(uniqueId, txnID, sessionID, errorMsg);
|
||||
if (weRc)
|
||||
{
|
||||
weRc = rollBackTransaction(uniqueId, txnID, sessionID, errorMsg);
|
||||
if (weRc == 0)
|
||||
{
|
||||
// Setup connection in WE with PS.
|
||||
joblist::ResourceManager* rm = joblist::ResourceManager::instance(true);
|
||||
joblist::DistributedEngineComm* fEc = joblist::DistributedEngineComm::instance(rm);
|
||||
weRc = fEc->Setup();
|
||||
}
|
||||
}
|
||||
|
||||
return weRc;
|
||||
}
|
||||
|
||||
int DMLPackageProcessor::rollBackTransaction(uint64_t uniqueId, BRM::TxnID txnID, uint32_t sessionID,
|
||||
std::string& errorMsg)
|
||||
{
|
||||
|
Reference in New Issue
Block a user