1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +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

@ -505,8 +505,9 @@ void WEClients::write(const messageqcpp::ByteStream& msg, uint32_t connection)
fPmConnections[connection]->write(msg);
else
{
// new behavior: connection client is nullptr means it is read-only.
ostringstream os;
os << "Lost connection to WriteEngineServer on pm" << connection;
os << "Connection to readonly pm" << connection;
throw runtime_error(os.str());
}
}

View File

@ -37,6 +37,7 @@ namespace WriteEngine
WE_DDLCommandClient::WE_DDLCommandClient()
{
fWEClient = new WEClients(WEClients::DDLPROC);
fOamCache = oam::OamCache::makeOamCache();
}
WE_DDLCommandClient::~WE_DDLCommandClient()
@ -64,7 +65,7 @@ uint8_t WE_DDLCommandClient::UpdateSyscolumnNextval(uint32_t columnOid, uint64_t
try
{
fOam.getDbrootPmConfig(dbRoot, pmNum);
pmNum = fOamCache->getOwnerPM(dbRoot);
fWEClient->write(command, pmNum);
while (1)

View File

@ -26,6 +26,7 @@
#include "dbrm.h"
#include "liboamcpp.h"
#include "writeengine.h"
#include "oamcache.h"
#define EXPORT
@ -50,7 +51,7 @@ class WE_DDLCommandClient
private:
BRM::DBRM fDbrm;
WEClients* fWEClient;
oam::Oam fOam;
oam::OamCache* fOamCache;
};
} // namespace WriteEngine