You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +03:00
feat(MCOL-6082): Multiple readers of dbroots using OamCache logic
This patch introduces centralized logic of selecting what dbroot is accessible in PrimProc on what node. The logic is in OamCache for time being and can be moved later.
This commit is contained in:
@@ -845,20 +845,15 @@ void CommandPackageProcessor::clearTableLock(uint64_t uniqueId, const dmlpackage
|
||||
establishTableLockToClear(tableLockID, lockInfo);
|
||||
lockGrabbed = true;
|
||||
|
||||
oam::OamCache* oamCache = oam::OamCache::makeOamCache();
|
||||
oam::OamCache::dbRootPMMap_t dbRootPmMap = oamCache->getDBRootToPMMap();
|
||||
std::map<int, int>::const_iterator mapIter;
|
||||
std::set<int> pmSet;
|
||||
|
||||
// Construct relevant list of PMs based on the DBRoots associated
|
||||
// with the tableLock.
|
||||
for (unsigned int k = 0; k < lockInfo.dbrootList.size(); k++)
|
||||
{
|
||||
mapIter = dbRootPmMap->find(lockInfo.dbrootList[k]);
|
||||
|
||||
if (mapIter != dbRootPmMap->end())
|
||||
if (!oamcache()->isOffline(lockInfo.dbrootList[k]))
|
||||
{
|
||||
int pm = mapIter->second;
|
||||
int pm = oamcache()->getOwnerPM(lockInfo.dbrootList[k]);
|
||||
pmSet.insert(pm);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user