1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +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:
Serguey Zefirov
2025-07-10 11:31:32 +00:00
parent 2753743762
commit 5aa2a824c2
33 changed files with 232 additions and 194 deletions

View File

@@ -684,12 +684,14 @@ void Oam::getPmDbrootConfig(const int pmid, DBRootConfigList& dbrootconfiglist)
* Get DBRoot - PM Config data
*
********************************************************************/
void Oam::getDbrootPmConfig(const int dbrootid, int& pmid)
void Oam::getDbrootPmConfig(const int dbrootid, set<int>& pmids)
{
SystemModuleTypeConfig systemmoduletypeconfig;
ModuleTypeConfig moduletypeconfig;
ModuleConfig moduleconfig;
pmids.clear();
try
{
getSystemConfig(systemmoduletypeconfig);
@@ -716,13 +718,16 @@ void Oam::getDbrootPmConfig(const int dbrootid, int& pmid)
{
if (*pt1 == dbrootid)
{
pmid = (*pt).DeviceID;
return;
pmids.insert((*pt).DeviceID);
}
}
}
}
}
if (!pmids.empty())
{
return;
}
// dbrootid not found, return with error
exceptionControl("getDbrootPmConfig", API_INVALID_PARAMETER);