You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
fix(PP,BPP): reduced the BPPMap lock scope to avoid holding lock whilst calling heavy BPPV dtor. It became heavy b/c of CountingAllocator.
This commit is contained in:
@@ -1557,6 +1557,8 @@ struct BPPHandler
|
||||
bs >> stepID;
|
||||
bs >> uniqueID;
|
||||
|
||||
boost::shared_ptr<BPPV> bppv = nullptr;
|
||||
{
|
||||
boost::unique_lock<shared_mutex> lk(getDJLock(uniqueID));
|
||||
boost::mutex::scoped_lock scoped(bppLock);
|
||||
|
||||
@@ -1571,11 +1573,10 @@ struct BPPHandler
|
||||
|
||||
if (it != bppMap.end())
|
||||
{
|
||||
boost::shared_ptr<BPPV> bppv = it->second;
|
||||
bppv = it->second;
|
||||
|
||||
if (bppv->joinDataReceived)
|
||||
{
|
||||
bppv->abort();
|
||||
bppMap.erase(it);
|
||||
}
|
||||
else
|
||||
@@ -1611,6 +1612,12 @@ struct BPPHandler
|
||||
fPrimitiveServerPtr->getOOBProcessorThreadPool()->removeJobs(uniqueID);
|
||||
lk.unlock();
|
||||
deleteDJLock(uniqueID);
|
||||
}
|
||||
|
||||
if (bppv)
|
||||
{
|
||||
bppv->abort();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user