You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-10 01:22:48 +03:00
Compiles, crashes in smoke test
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "we_brm.h"
|
||||
#include "bytestream.h"
|
||||
#include "liboamcpp.h"
|
||||
#include "oamcache.h"
|
||||
#include "messagequeue.h"
|
||||
#include "messagequeuepool.h"
|
||||
#include "we_messages.h"
|
||||
@@ -119,7 +120,7 @@ static int generate_result(BRM::OID_t oid, BRM::DBRM* emp, TABLE* table, THD* th
|
||||
off_t compressedFileSize = 0;
|
||||
we_config.initConfigCache();
|
||||
messageqcpp::MessageQueueClient* msgQueueClient;
|
||||
oam::Oam oam_instance;
|
||||
oam::OamCache* oamcache = oam::OamCache::makeOamCache();
|
||||
int pmId = 0;
|
||||
int rc;
|
||||
|
||||
@@ -141,7 +142,7 @@ static int generate_result(BRM::OID_t oid, BRM::DBRM* emp, TABLE* table, THD* th
|
||||
|
||||
try
|
||||
{
|
||||
oam_instance.getDbrootPmConfig(iter->dbRoot, pmId);
|
||||
pmId = oamcache->getOwnerPM(iter->dbRoot);
|
||||
}
|
||||
catch (std::runtime_error&)
|
||||
{
|
||||
|
@@ -393,7 +393,7 @@ void rollbackAll(DBRM* dbrm)
|
||||
|
||||
try
|
||||
{
|
||||
rollbackProcessor.processBulkRollback(tableLocks[i], dbrm, uniqueId, dbRootPMMap, lockReleased);
|
||||
rollbackProcessor.processBulkRollback(tableLocks[i], dbrm, uniqueId, oamcache, lockReleased);
|
||||
ostringstream oss;
|
||||
oss << "DMLProc started bulkrollback on table OID " << tableLocks[i].tableOID << " and table lock id "
|
||||
<< tableLocks[i].id << " finished and tablelock is released.";
|
||||
|
@@ -1847,7 +1847,7 @@ void DMLProcessor::operator()()
|
||||
|
||||
void RollbackTransactionProcessor::processBulkRollback(BRM::TableLockInfo lockInfo, BRM::DBRM* dbrm,
|
||||
uint64_t uniqueId,
|
||||
OamCache::dbRootPMMap_t& dbRootPMMap,
|
||||
OamCache* oamcache,
|
||||
bool& lockReleased)
|
||||
{
|
||||
// Take over ownership of stale lock.
|
||||
@@ -1886,7 +1886,7 @@ void RollbackTransactionProcessor::processBulkRollback(BRM::TableLockInfo lockIn
|
||||
|
||||
for (uint32_t i = 0; i < lockInfo.dbrootList.size(); i++)
|
||||
{
|
||||
pmId = (*dbRootPMMap)[lockInfo.dbrootList[i]];
|
||||
pmId = oamcache->getOwnerPM(lockInfo.dbrootList[i]);
|
||||
pmSet.insert(pmId);
|
||||
}
|
||||
|
||||
|
@@ -321,7 +321,7 @@ class RollbackTransactionProcessor : public dmlpackageprocessor::DMLPackageProce
|
||||
}
|
||||
|
||||
void processBulkRollback(BRM::TableLockInfo lockInfo, BRM::DBRM* dbrm, uint64_t uniqueId,
|
||||
oam::OamCache::dbRootPMMap_t& dbRootPMMap, bool& lockReleased);
|
||||
oam::OamCache* oamcache, bool& lockReleased);
|
||||
|
||||
protected:
|
||||
private:
|
||||
|
@@ -295,5 +295,17 @@ int OamCache::getOwnerPM(int dbroot) // Owner's PM index.
|
||||
}
|
||||
idbassert_s(0, "cannot find owner for dbroot " << dbroot);
|
||||
}
|
||||
std::vector<int> OamCache::getPMDBRoots(int PM) // what DBRoots are owned by given PM.
|
||||
{
|
||||
std::vector<int> result;
|
||||
for (const auto& dbroot : (*dbRootPMMap))
|
||||
{
|
||||
if (dbroot.second.find(PM) != dbroot.second.end())
|
||||
{
|
||||
result.push_back(dbroot.first);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
} /* namespace oam */
|
||||
|
@@ -159,19 +159,22 @@ int constructPMList(const std::vector<uint32_t>& dbRootList, std::vector<uint32_
|
||||
// Get OAM information
|
||||
oam::Oam oam;
|
||||
std::set<uint32_t> pmSet; // used to filter out duplicates
|
||||
int pm;
|
||||
std::set<int> pms;
|
||||
|
||||
for (unsigned j = 0; j < dbRootList.size(); j++)
|
||||
{
|
||||
dbRoot = dbRootList[j];
|
||||
oam.getDbrootPmConfig(dbRootList[j], pm);
|
||||
pmSet.insert(pm);
|
||||
oam.getDbrootPmConfig(dbRootList[j], pms);
|
||||
for (auto pm : pms)
|
||||
{
|
||||
pmSet.insert(pm);
|
||||
}
|
||||
}
|
||||
|
||||
// Store unique set of PM IDs into output vector
|
||||
for (std::set<uint32_t>::const_iterator iter = pmSet.begin(); iter != pmSet.end(); ++iter)
|
||||
for (auto pm : pmSet)
|
||||
{
|
||||
pmList.push_back(*iter);
|
||||
pmList.push_back(pm);
|
||||
}
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
|
Reference in New Issue
Block a user