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
MCOL-5555 Add support for startreadonly
command. (#3081)
This patch adds support for `startreadonly` command which waits until all active cpimport jobs are done and then puts controller node to readonly mode.
This commit is contained in:
@ -60,8 +60,7 @@ BRMWrapper* volatile BRMWrapper::m_instance = NULL;
|
||||
boost::thread_specific_ptr<int> BRMWrapper::m_ThreadDataPtr;
|
||||
boost::mutex BRMWrapper::m_instanceCreateMutex;
|
||||
|
||||
|
||||
bool BRMWrapper::m_useVb = true;
|
||||
bool BRMWrapper::m_useVb = true;
|
||||
OID BRMWrapper::m_curVBOid = INVALID_NUM;
|
||||
IDBDataFile* BRMWrapper::m_curVBFile = NULL;
|
||||
boost::mutex vbFileLock;
|
||||
@ -744,6 +743,16 @@ int BRMWrapper::copyVBBlock(IDBDataFile* pSourceFile, IDBDataFile* pTargetFile,
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
uint8_t BRMWrapper::newCpimportJob(uint32_t &jobId)
|
||||
{
|
||||
return blockRsltnMgrPtr->newCpimportJob(jobId);
|
||||
}
|
||||
|
||||
void BRMWrapper::finishCpimportJob(uint32_t jobId)
|
||||
{
|
||||
blockRsltnMgrPtr->finishCpimportJob(jobId);
|
||||
}
|
||||
|
||||
int BRMWrapper::commit(const VER_t transID)
|
||||
{
|
||||
int rc = blockRsltnMgrPtr->vbCommit(transID);
|
||||
|
@ -380,6 +380,8 @@ class BRMWrapper : public WEObj
|
||||
* @brief Commit the transaction
|
||||
*/
|
||||
EXPORT int commit(const BRM::VER_t transID);
|
||||
EXPORT uint8_t newCpimportJob(uint32_t &jobId);
|
||||
EXPORT void finishCpimportJob(uint32_t jobId);
|
||||
|
||||
/**
|
||||
* @brief Copy blocks between write engine and version buffer
|
||||
@ -466,7 +468,7 @@ class BRMWrapper : public WEObj
|
||||
static boost::thread_specific_ptr<int> m_ThreadDataPtr;
|
||||
static boost::mutex m_instanceCreateMutex;
|
||||
|
||||
EXPORT static bool m_useVb;
|
||||
EXPORT static bool m_useVb;
|
||||
|
||||
static OID m_curVBOid;
|
||||
static IDBDataFile* m_curVBFile;
|
||||
|
Reference in New Issue
Block a user