You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
MCOL-4912 This patch introduces Extent Map index to improve EM scaleability
EM scaleability project has two parts: phase1 and phase2. This is phase1 that brings EM index to speed up(from O(n) down to the speed of boost::unordered_map) EM lookups looking for <dbroot, oid, partition> tuple to turn it into LBID, e.g. most bulk insertion meta info operations. The basis is boost::shared_managed_object where EMIndex is stored. Whilst it is not debug-friendly it allows to put a nested structs into shmem. EMIndex has 3 tiers. Top down description: vector of dbroots, map of oids to partition vectors, partition vectors that have EM indices. Separate EM methods now queries index before they do EM run. EMIndex has a separate shmem file with the fixed id MCS-shm-00060001.
This commit is contained in:
committed by
Leonid Fedorov
parent
fb3eaabd29
commit
4c26e4f960
@ -60,7 +60,7 @@ void shmDoit(key_t shm_key, const string& label)
|
||||
bi::offset_t memSize = 0;
|
||||
memObj.get_size(memSize);
|
||||
std::lock_guard<std::mutex> lk(coutMutex);
|
||||
cout << label << ": shm_key: " << shm_key << "; key_name: " << key_name << "; size: " << memSize
|
||||
cout << label << ": shm|sem_key: " << shm_key << "; key_name: " << key_name << "; size: " << memSize
|
||||
<< endl;
|
||||
}
|
||||
catch (...)
|
||||
@ -74,6 +74,11 @@ void shmDoit(key_t shm_key, const string& label)
|
||||
}
|
||||
}
|
||||
|
||||
void semDoit(key_t sem_key, const string& label)
|
||||
{
|
||||
shmDoit(sem_key, label);
|
||||
}
|
||||
|
||||
void shmDoitRange(key_t shm_key, const string& label)
|
||||
{
|
||||
if (shm_key == 0)
|
||||
@ -87,32 +92,6 @@ void shmDoitRange(key_t shm_key, const string& label)
|
||||
}
|
||||
}
|
||||
|
||||
void semDoit(key_t sem_key, const string& label)
|
||||
{
|
||||
string key_name = ShmKeys::keyToName(sem_key);
|
||||
|
||||
if (vFlg)
|
||||
{
|
||||
try
|
||||
{
|
||||
bi::shared_memory_object memObj(bi::open_only, key_name.c_str(), bi::read_only);
|
||||
bi::offset_t memSize = 0;
|
||||
memObj.get_size(memSize);
|
||||
std::lock_guard<std::mutex> lk(coutMutex);
|
||||
cout << label << ": sem_key: " << sem_key << "; key_name: " << key_name << "; size: " << memSize
|
||||
<< endl;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (!nFlg)
|
||||
{
|
||||
bi::shared_memory_object::remove(key_name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void usage()
|
||||
{
|
||||
cout << "usage: clearShm [-cvnh]" << endl;
|
||||
@ -206,6 +185,8 @@ int main(int argc, char** argv)
|
||||
tg.add_thread(tp);
|
||||
tp = new boost::thread(ThdFunc(BrmKeys.KEYRANGE_VSS_BASE, "VSS "));
|
||||
tg.add_thread(tp);
|
||||
tp = new boost::thread(ThdFunc(BrmKeys.KEYRANGE_EXTENTMAP_INDEX_BASE, "EXTMAP_INDX"));
|
||||
tg.add_thread(tp);
|
||||
tg.join_all();
|
||||
|
||||
shmDoit(BrmKeys.MST_SYSVKEY, "MST ");
|
||||
@ -226,6 +207,7 @@ int main(int argc, char** argv)
|
||||
semDoit(BrmKeys.KEYRANGE_EMFREELIST_BASE, "EXTMAP_FREE");
|
||||
semDoit(BrmKeys.KEYRANGE_VBBM_BASE, "VBBM ");
|
||||
semDoit(BrmKeys.KEYRANGE_VSS_BASE, "VSS ");
|
||||
semDoit(BrmKeys.KEYRANGE_EXTENTMAP_INDEX_BASE, "EXTMAP_INDX");
|
||||
semDoit(BrmKeys.MST_SYSVKEY, "MST ");
|
||||
|
||||
if (!cFlg)
|
||||
|
Reference in New Issue
Block a user