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

Revert "No boost condition (#2822)" (#2828)

This reverts commit f916e64927.
This commit is contained in:
Roman Nozdrin
2023-04-22 13:49:50 +01:00
committed by GitHub
parent f916e64927
commit 4fe9cd64a3
245 changed files with 2007 additions and 1261 deletions

View File

@ -224,7 +224,7 @@ DistributedEngineComm::~DistributedEngineComm()
int32_t DistributedEngineComm::Setup()
{
// This is here to ensure that this function does not get invoked multiple times simultaneously.
std::unique_lock setupLock(fSetupMutex);
boost::mutex::scoped_lock setupLock(fSetupMutex);
makeBusy(true);
@ -329,7 +329,7 @@ int32_t DistributedEngineComm::Setup()
// for every entry in newClients up to newPmCount, scan for the same ip in the
// first pmCount. If there is no match, it's a new node,
// call the event listeners' newPMOnline() callbacks.
std::unique_lock lock(eventListenerLock);
boost::mutex::scoped_lock lock(eventListenerLock);
for (uint32_t i = 0; i < newPmCount; i++)
{
@ -437,7 +437,7 @@ Error:
/*
// reset the pmconnection vector
ClientList tempConns;
std::unique_lock onErrLock(fOnErrMutex);
boost::mutex::scoped_lock onErrLock(fOnErrMutex);
string moduleName = client->moduleName();
//cout << "moduleName=" << moduleName << endl;
for ( uint32_t i = 0; i < fPmConnections.size(); i++)
@ -468,9 +468,8 @@ void DistributedEngineComm::addQueue(uint32_t key, bool sendACKs)
{
bool b;
std::mutex* lock = new std::mutex();
std::condition_variable* cond = new std::condition_variable();
boost::mutex* lock = new boost::mutex();
condition* cond = new condition();
uint32_t firstPMInterleavedConnectionId =
key % (fPmConnections.size() / pmCount) * fDECConnectionsPerQuery * pmCount % fPmConnections.size();
boost::shared_ptr<MQE> mqe(new MQE(pmCount, firstPMInterleavedConnectionId));
@ -1195,7 +1194,7 @@ int DistributedEngineComm::writeToClient(size_t aPMIndex, const SBS& bs, uint32_
ClientList tempConns;
{
//cout << "WARNING: DEC WRITE BROKEN PIPE " <<
fPmConnections[index]->otherEnd()<< endl; std::unique_lock onErrLock(fOnErrMutex); string
fPmConnections[index]->otherEnd()<< endl; boost::mutex::scoped_lock onErrLock(fOnErrMutex); string
moduleName = fPmConnections[index]->moduleName();
//cout << "module name = " << moduleName << endl;
if (index >= fPmConnections.size()) return 0;
@ -1241,13 +1240,13 @@ uint32_t DistributedEngineComm::size(uint32_t key)
void DistributedEngineComm::addDECEventListener(DECEventListener* l)
{
std::unique_lock lk(eventListenerLock);
boost::mutex::scoped_lock lk(eventListenerLock);
eventListeners.push_back(l);
}
void DistributedEngineComm::removeDECEventListener(DECEventListener* l)
{
std::unique_lock lk(eventListenerLock);
boost::mutex::scoped_lock lk(eventListenerLock);
std::vector<DECEventListener*> newListeners;
uint32_t s = eventListeners.size();