1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-5166 This patch adds support for in-memory communication b/w EM to PP via a shared queue in DEC class

JobList low-level code relateod to primitive jobs now uses shared pointers instead of ByteStream refs talking to DEC
b/c same-node EM-PP communication now goes over a queue in DEC instead of a network hop.
PP now has a separate thread that processes the primitive job messages from that DEC queue.
This commit is contained in:
Roman Nozdrin
2022-07-21 19:37:18 +00:00
committed by Leonid Fedorov
parent 9ef16c6ded
commit a9d8924683
11 changed files with 418 additions and 232 deletions

View File

@@ -15,8 +15,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
#include <iostream>
#include <gtest/gtest.h>
#include <iostream>
#include <mutex>
#include <vector>
#include "utils/threadpool/fair_threadpool.h"
@@ -27,6 +28,7 @@ using namespace threadpool;
using ResultsType = std::vector<int>;
static ResultsType results;
static std::mutex globMutex;
class FairThreadPoolTest : public testing::Test
{
@@ -50,6 +52,7 @@ class TestFunctor : public FairThreadPool::Functor
int operator()() override
{
usleep(delay_);
std::lock_guard<std::mutex> gl(globMutex);
results.push_back(id_);
return 0;
}
@@ -74,6 +77,7 @@ class TestRescheduleFunctor : public FairThreadPool::Functor
return 1; // re-schedule the Job
}
usleep(delay_);
std::lock_guard<std::mutex> gl(globMutex);
results.push_back(id_);
return 0;
}