You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-513 clean up and test thread pool for ExeMgr
This commit is contained in:
@ -4211,12 +4211,14 @@ void TupleAggregateStep::threadedAggregateRowGroups(uint32_t threadID)
|
||||
// and if there is more data to read, the
|
||||
// first thread will start another thread until the
|
||||
// maximum number is reached.
|
||||
#if 0
|
||||
if (threadID == 0 && fFirstPhaseThreadCount < fNumOfThreads &&
|
||||
dlIn->more(fInputIter)) {
|
||||
dlIn->more(fInputIter))
|
||||
{
|
||||
fFirstPhaseRunners.push_back(jobstepThreadPool.invoke(ThreadedAggregator(this, fFirstPhaseThreadCount)));
|
||||
fFirstPhaseThreadCount++;
|
||||
}
|
||||
|
||||
#endif
|
||||
fRowGroupIns[threadID].setData(&rgData);
|
||||
fMemUsage[threadID] += fRowGroupIns[threadID].getSizeWithStrings();
|
||||
if (!fRm->getMemory(fRowGroupIns[threadID].getSizeWithStrings(), fSessionMemLimit))
|
||||
@ -4479,22 +4481,25 @@ uint64_t TupleAggregateStep::doThreadedAggregate(ByteStream& bs, RowGroupDL* dlp
|
||||
if (!fDoneAggregate)
|
||||
{
|
||||
initializeMultiThread();
|
||||
/*
|
||||
// This block of code starts all threads at the start
|
||||
|
||||
// This block of code starts all threads at the start
|
||||
fFirstPhaseThreadCount = fNumOfThreads;
|
||||
boost::shared_ptr<boost::thread> runner;
|
||||
fFirstPhaseRunners.clear();
|
||||
fFirstPhaseRunners.reserve(fNumOfThreads); // to prevent a resize during use
|
||||
for (i = 0; i < fNumOfThreads; i++)
|
||||
{
|
||||
fFirstPhaseRunners.push_back(jobstepThreadPool.invoke(ThreadedAggregator(this, i)))
|
||||
fFirstPhaseRunners.push_back(jobstepThreadPool.invoke(ThreadedAggregator(this, i)));
|
||||
}
|
||||
*/
|
||||
|
||||
#if 0
|
||||
// This block of code starts one thread, relies on doThreadedAggregation()
|
||||
// For reasons unknown, this doesn't work right with threadpool
|
||||
// to start more as needed
|
||||
fFirstPhaseRunners.clear();
|
||||
fFirstPhaseRunners.reserve(fNumOfThreads); // to prevent a resize during use
|
||||
fFirstPhaseThreadCount = 1;
|
||||
fFirstPhaseRunners.push_back(jobstepThreadPool.invoke(ThreadedAggregator(this, 0)));
|
||||
#endif
|
||||
|
||||
// Now wait for that thread plus all the threads it may have spawned
|
||||
jobstepThreadPool.join(fFirstPhaseRunners);
|
||||
|
Reference in New Issue
Block a user