1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

Revert "This patch disables FairThreadPool to double check if this feature contributes to multiple strange side-effects and ocassional failed MTR tests"

This reverts commit b78cbffa93.
This commit is contained in:
Roman Nozdrin
2022-07-22 14:04:06 +00:00
parent 63047aa8ef
commit 3b87532413
12 changed files with 252 additions and 76 deletions

View File

@ -52,33 +52,19 @@ class PriorityThreadPool
// this thread pool to reschedule the job, 0 will throw it away on return.
virtual int operator()() = 0;
};
using TransactionIdxT = uint32_t;
struct Job
{
Job() : weight(1), priority(0), id(0)
{
}
Job(const uint32_t uniqueID, const uint32_t stepID, const TransactionIdxT txnIdx,
const boost::shared_ptr<Functor>& functor, const primitiveprocessor::SP_UM_IOSOCK& sock,
const uint32_t weight = 1, const uint32_t priority = 0, const uint32_t id = 0)
: uniqueID(uniqueID)
, stepID(stepID)
, txnIdx(txnIdx)
, functor(functor)
, sock(sock)
, weight(weight)
, priority(priority)
, id(id)
{
}
uint32_t uniqueID;
uint32_t stepID;
TransactionIdxT txnIdx;
boost::shared_ptr<Functor> functor;
primitiveprocessor::SP_UM_IOSOCK sock;
uint32_t weight;
uint32_t priority;
uint32_t id;
uint32_t uniqueID;
uint32_t stepID;
primitiveprocessor::SP_UM_IOSOCK sock;
};
enum Priority
@ -128,7 +114,7 @@ class PriorityThreadPool
{
return blockedThreads;
}
protected:
private:
struct ThreadHelper