1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

fix(threadpool): MCOL-5645 errenous threadpool Job ctor implictly sets socket shared_ptr to nullptr causing sigabrt when threadpool returns an error (#3125)

This commit is contained in:
drrtuy
2024-02-12 11:33:24 +02:00
committed by GitHub
parent a0abfa0e68
commit 0ff88e860f
3 changed files with 2 additions and 27 deletions

View File

@ -1967,7 +1967,7 @@ struct ReadThread
id = fBPPHandler->getUniqueID(sbs, ismHdr->Command); id = fBPPHandler->getUniqueID(sbs, ismHdr->Command);
functor.reset(new BPPHandler::Abort(fBPPHandler, sbs)); functor.reset(new BPPHandler::Abort(fBPPHandler, sbs));
} }
PriorityThreadPool::Job job(uniqueID, stepID, txnId, functor, weight, priority, id); PriorityThreadPool::Job job(uniqueID, stepID, txnId, functor, outIos, weight, priority, id);
OOBProcPool->addJob(job); OOBProcPool->addJob(job);
break; break;
} }

View File

@ -76,19 +76,7 @@ class FairThreadPool
, id_(id) , id_(id)
{ {
} }
// sock_ is nullptr here. This is kinda dangerous.
Job(const uint32_t uniqueID, const uint32_t stepID, const TransactionIdxT txnIdx,
const boost::shared_ptr<Functor>& functor, const uint32_t weight = 1, const uint32_t priority = 0,
const uint32_t id = 0)
: uniqueID_(uniqueID)
, stepID_(stepID)
, txnIdx_(txnIdx)
, functor_(functor)
, weight_(weight)
, priority_(priority)
, id_(id)
{
}
uint32_t uniqueID_; uint32_t uniqueID_;
uint32_t stepID_; uint32_t stepID_;
TransactionIdxT txnIdx_; TransactionIdxT txnIdx_;

View File

@ -74,19 +74,6 @@ class PriorityThreadPool
, sock(sock) , sock(sock)
{ {
} }
// sock_ is nullptr here. This is kinda dangerous.
Job(const uint32_t uniqueID, const uint32_t stepID, const TransactionIdxT txnIdx,
const boost::shared_ptr<Functor>& functor, const uint32_t weight = 1, const uint32_t priority = 0,
const uint32_t id = 0)
: functor(functor)
, weight(weight)
, priority(priority)
, id(id)
, stepID(stepID)
, uniqueID(uniqueID)
, sock(nullptr)
{
}
boost::shared_ptr<Functor> functor; boost::shared_ptr<Functor> functor;
uint32_t weight; uint32_t weight;