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

Merge pull request #1771 from mariadb-SergeyZefirov/MCOL-2044-update-ranges-during-DML

Mcol 2044 update ranges during dml
This commit is contained in:
Roman Nozdrin
2021-04-06 12:46:02 +03:00
committed by GitHub
198 changed files with 2949 additions and 275 deletions

View File

@ -430,7 +430,14 @@ CommandPackageProcessor::processPackage(dmlpackage::CalpontDMLPackage& cpackage)
if (!cpInvalidated)
{
fDbrm->invalidateUncommittedExtentLBIDs(0, &lbidList);
// The code below assumes that in case of COMMIT all ranges for all touched LBIDs
// are either correctly set or correctly reset.
// It is also assumes that ROLLBACK or other operations but COMMIT may not return ranges
// to state that is correct. This is why we invalidate extents when we are not committing.
if (stmt != "COMMIT")
{
fDbrm->invalidateUncommittedExtentLBIDs(0, &lbidList);
}
}
}
}

View File

@ -485,37 +485,7 @@ int DMLPackageProcessor::commitBatchAutoOnTransaction(uint64_t uniqueId, BRM::Tx
//set CP data before hwm.
//cout << "setting hwm allHwm size " << allHwm.size() << endl;
vector<BRM::LBID_t> lbidList;
if (idbdatafile::IDBPolicy::useHdfs())
{
BRM::LBID_t startLbid;
for ( unsigned i = 0; i < allHwm.size(); i++)
{
rc = fDbrm->lookupLocalStartLbid(allHwm[i].oid, allHwm[i].partNum, allHwm[i].segNum, allHwm[i].hwm, startLbid);
lbidList.push_back(startLbid);
}
}
else
fDbrm->getUncommittedExtentLBIDs(static_cast<BRM::VER_t>(txnID.id), lbidList);
vector<BRM::LBID_t>::const_iterator iter = lbidList.begin();
vector<BRM::LBID_t>::const_iterator end = lbidList.end();
BRM::CPInfoList_t cpInfos;
BRM::CPInfo aInfo;
while (iter != end)
{
aInfo.firstLbid = *iter;
aInfo.max = numeric_limits<int64_t>::min(); // Not used
aInfo.min = numeric_limits<int64_t>::max(); // Not used
utils::int128Min(aInfo.bigMax); // Not used
utils::int128Max(aInfo.bigMin); // Not used
aInfo.seqNum = -1;
cpInfos.push_back(aInfo);
++iter;
}
std::vector<BRM::CPInfoMerge> mergeCPDataArgs;
rc = fDbrm->bulkSetHWMAndCP(allHwm, cpInfos, mergeCPDataArgs, txnID.id);