You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-5352 Properly handle PP restart for DML/DDL operations.
This commit is contained in:
committed by
Leonid Fedorov
parent
d3896efb0f
commit
7f14dae5c7
@ -541,6 +541,25 @@ int PackageHandler::clearTableAccess()
|
||||
return 1;
|
||||
}
|
||||
|
||||
CalpontSystemCatalog::ROPair PackageHandler::getTableRID(
|
||||
boost::shared_ptr<execplan::CalpontSystemCatalog> fcsc,
|
||||
execplan::CalpontSystemCatalog::TableName& tableName)
|
||||
{
|
||||
execplan::CalpontSystemCatalog::ROPair roPair;
|
||||
try
|
||||
{
|
||||
roPair = fcsc->tableRID(tableName);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
if (setupDec())
|
||||
throw;
|
||||
roPair = fcsc->tableRID(tableName);
|
||||
}
|
||||
|
||||
return roPair;
|
||||
}
|
||||
|
||||
void PackageHandler::run()
|
||||
{
|
||||
ResourceManager* frm = ResourceManager::instance();
|
||||
@ -577,7 +596,7 @@ void PackageHandler::run()
|
||||
CalpontSystemCatalog::TableName tableName;
|
||||
tableName.schema = insertPkg.get_Table()->get_SchemaName();
|
||||
tableName.table = insertPkg.get_Table()->get_TableName();
|
||||
CalpontSystemCatalog::ROPair roPair = fcsc->tableRID(tableName);
|
||||
CalpontSystemCatalog::ROPair roPair = getTableRID(fcsc, tableName);
|
||||
fTableOid = roPair.objnum;
|
||||
}
|
||||
synchTable.setPackage(this, &insertPkg); // Blocks if another DML thread is using this fTableOid
|
||||
@ -976,7 +995,7 @@ void PackageHandler::run()
|
||||
CalpontSystemCatalog::TableName tableName;
|
||||
tableName.schema = updatePkg->get_Table()->get_SchemaName();
|
||||
tableName.table = updatePkg->get_Table()->get_TableName();
|
||||
CalpontSystemCatalog::ROPair roPair = fcsc->tableRID(tableName);
|
||||
CalpontSystemCatalog::ROPair roPair = getTableRID(fcsc, tableName);
|
||||
fTableOid = roPair.objnum;
|
||||
}
|
||||
synchTable.setPackage(this,
|
||||
@ -1036,7 +1055,7 @@ void PackageHandler::run()
|
||||
CalpontSystemCatalog::TableName tableName;
|
||||
tableName.schema = deletePkg->get_Table()->get_SchemaName();
|
||||
tableName.table = deletePkg->get_Table()->get_TableName();
|
||||
CalpontSystemCatalog::ROPair roPair = fcsc->tableRID(tableName);
|
||||
CalpontSystemCatalog::ROPair roPair = getTableRID(fcsc, tableName);
|
||||
fTableOid = roPair.objnum;
|
||||
}
|
||||
synchTable.setPackage(this,
|
||||
|
@ -199,6 +199,15 @@ class PackageHandler
|
||||
}
|
||||
|
||||
private:
|
||||
int32_t setupDec()
|
||||
{
|
||||
joblist::ResourceManager* rm = joblist::ResourceManager::instance(true);
|
||||
joblist::DistributedEngineComm* fEc = joblist::DistributedEngineComm::instance(rm);
|
||||
return fEc->Setup();
|
||||
}
|
||||
execplan::CalpontSystemCatalog::ROPair getTableRID(boost::shared_ptr<execplan::CalpontSystemCatalog> fcsc,
|
||||
execplan::CalpontSystemCatalog::TableName& tableName);
|
||||
|
||||
messageqcpp::IOSocket fIos;
|
||||
boost::shared_ptr<messageqcpp::ByteStream> fByteStream;
|
||||
boost::scoped_ptr<dmlpackageprocessor::DMLPackageProcessor> fProcessor;
|
||||
@ -311,22 +320,21 @@ class RollbackTransactionProcessor : public dmlpackageprocessor::DMLPackageProce
|
||||
RollbackTransactionProcessor(BRM::DBRM* aDbrm) : DMLPackageProcessor(aDbrm, 1)
|
||||
{
|
||||
}
|
||||
/** @brief process an Rollback transactions
|
||||
*
|
||||
* @param cpackage the UpdateDMLPackage to process
|
||||
*/
|
||||
inline DMLResult processPackage(dmlpackage::CalpontDMLPackage& cpackage)
|
||||
{
|
||||
DMLResult result;
|
||||
result.result = NO_ERROR;
|
||||
return result;
|
||||
}
|
||||
|
||||
void processBulkRollback(BRM::TableLockInfo lockInfo, BRM::DBRM* dbrm, uint64_t uniqueId,
|
||||
oam::OamCache::dbRootPMMap_t& dbRootPMMap, bool& lockReleased);
|
||||
|
||||
protected:
|
||||
private:
|
||||
/** @brief process an Rollback transactions
|
||||
*
|
||||
* @param cpackage the UpdateDMLPackage to process
|
||||
*/
|
||||
DMLResult processPackageInternal(dmlpackage::CalpontDMLPackage& cpackage)
|
||||
{
|
||||
DMLResult result;
|
||||
result.result = NO_ERROR;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace dmlprocessor
|
||||
|
||||
|
Reference in New Issue
Block a user