You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +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:
@ -230,6 +230,15 @@ void BatchInsertProc::buildLastPkg(messageqcpp::ByteStream& bs)
|
||||
bs << rt;
|
||||
}
|
||||
|
||||
uint32_t BatchInsertProc::selectNextPM()
|
||||
{
|
||||
uint32_t pm;
|
||||
do
|
||||
{
|
||||
pm = fBatchLoader->selectNextPM();
|
||||
} while (pm != 0 && fWEClient->isConnectionReadonly(pm));
|
||||
return pm;
|
||||
}
|
||||
void BatchInsertProc::sendFirstBatch()
|
||||
{
|
||||
uint32_t firstPmId = 0;
|
||||
@ -237,7 +246,7 @@ void BatchInsertProc::sendFirstBatch()
|
||||
|
||||
try
|
||||
{
|
||||
firstPmId = fBatchLoader->selectNextPM();
|
||||
firstPmId = selectNextPM();
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
@ -268,7 +277,7 @@ void BatchInsertProc::sendNextBatch()
|
||||
|
||||
try
|
||||
{
|
||||
fCurrentPMid = fBatchLoader->selectNextPM();
|
||||
fCurrentPMid = selectNextPM();
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user