You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
This reverts commit f916e64927
.
This commit is contained in:
@ -32,8 +32,8 @@
|
||||
#endif
|
||||
using namespace std;
|
||||
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
using namespace boost;
|
||||
|
||||
#include "messagequeue.h"
|
||||
#include "bytestream.h"
|
||||
@ -225,7 +225,7 @@ void WEClients::Setup()
|
||||
string fServer(buff);
|
||||
|
||||
boost::shared_ptr<MessageQueueClient> cl(new MessageQueueClient(fServer, rm->getConfig()));
|
||||
boost::shared_ptr<std::mutex> nl(new std::mutex());
|
||||
boost::shared_ptr<boost::mutex> nl(new boost::mutex());
|
||||
|
||||
// Bug 5224. Take out the retrys. If connection fails, we assume the server is down.
|
||||
try
|
||||
@ -355,7 +355,7 @@ void WEClients::Listen(boost::shared_ptr<MessageQueueClient> client, uint32_t co
|
||||
Error:
|
||||
// error condition! push 0 length bs to messagequeuemap and
|
||||
// eventually let jobstep error out.
|
||||
std::unique_lock lk(fMlock);
|
||||
boost::mutex::scoped_lock lk(fMlock);
|
||||
|
||||
MessageQueueMap::iterator map_tok;
|
||||
sbs.reset(new ByteStream(0));
|
||||
@ -371,7 +371,7 @@ Error:
|
||||
|
||||
// reset the pmconnection map
|
||||
{
|
||||
std::unique_lock onErrLock(fOnErrMutex);
|
||||
boost::mutex::scoped_lock onErrLock(fOnErrMutex);
|
||||
string moduleName = client->moduleName();
|
||||
ClientList::iterator itor = fPmConnections.begin();
|
||||
|
||||
@ -396,13 +396,13 @@ void WEClients::addQueue(uint32_t key)
|
||||
{
|
||||
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();
|
||||
boost::shared_ptr<MQE> mqe(new MQE(pmCount));
|
||||
|
||||
mqe->queue = WESMsgQueue(lock, cond);
|
||||
|
||||
std::unique_lock lk(fMlock);
|
||||
boost::mutex::scoped_lock lk(fMlock);
|
||||
b = fSessionMessages.insert(pair<uint32_t, boost::shared_ptr<MQE> >(key, mqe)).second;
|
||||
|
||||
if (!b)
|
||||
@ -415,7 +415,7 @@ void WEClients::addQueue(uint32_t key)
|
||||
|
||||
void WEClients::removeQueue(uint32_t key)
|
||||
{
|
||||
std::unique_lock lk(fMlock);
|
||||
boost::mutex::scoped_lock lk(fMlock);
|
||||
MessageQueueMap::iterator map_tok = fSessionMessages.find(key);
|
||||
|
||||
if (map_tok == fSessionMessages.end())
|
||||
@ -428,7 +428,7 @@ void WEClients::removeQueue(uint32_t key)
|
||||
|
||||
void WEClients::shutdownQueue(uint32_t key)
|
||||
{
|
||||
std::unique_lock lk(fMlock);
|
||||
boost::mutex::scoped_lock lk(fMlock);
|
||||
MessageQueueMap::iterator map_tok = fSessionMessages.find(key);
|
||||
|
||||
if (map_tok == fSessionMessages.end())
|
||||
@ -443,7 +443,7 @@ void WEClients::read(uint32_t key, SBS& bs)
|
||||
boost::shared_ptr<MQE> mqe;
|
||||
|
||||
// Find the StepMsgQueueList for this session
|
||||
std::unique_lock lk(fMlock);
|
||||
boost::mutex::scoped_lock lk(fMlock);
|
||||
MessageQueueMap::iterator map_tok = fSessionMessages.find(key);
|
||||
|
||||
if (map_tok == fSessionMessages.end())
|
||||
@ -521,7 +521,7 @@ void WEClients::addDataToOutput(SBS sbs, uint32_t connIndex)
|
||||
*sbs >> uniqueId;
|
||||
boost::shared_ptr<MQE> mqe;
|
||||
|
||||
std::unique_lock lk(fMlock);
|
||||
boost::mutex::scoped_lock lk(fMlock);
|
||||
MessageQueueMap::iterator map_tok = fSessionMessages.find(uniqueId);
|
||||
|
||||
if (map_tok == fSessionMessages.end())
|
||||
|
@ -27,13 +27,13 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <boost/thread.hpp>
|
||||
#include <condition_variable>
|
||||
#include <boost/thread/condition.hpp>
|
||||
#include <boost/scoped_array.hpp>
|
||||
|
||||
#include "bytestream.h"
|
||||
//#include "we_message.h"
|
||||
#include "threadsafequeue.h"
|
||||
|
||||
#include "rwlock_local.h"
|
||||
#include "resourcemanager.h"
|
||||
|
||||
#define EXPORT
|
||||
@ -49,7 +49,7 @@ class WEClients
|
||||
EXPORT WEClients(int PrgmID);
|
||||
EXPORT ~WEClients();
|
||||
|
||||
// static std::mutex map_mutex;
|
||||
// static boost::mutex map_mutex;
|
||||
EXPORT void addQueue(uint32_t key);
|
||||
EXPORT void removeQueue(uint32_t key);
|
||||
EXPORT void shutdownQueue(uint32_t key);
|
||||
@ -153,14 +153,14 @@ class WEClients
|
||||
ReaderList fWESReader; // all the reader threads for the pm servers
|
||||
MessageQueueMap
|
||||
fSessionMessages; // place to put messages from the pm server to be returned by the Read method
|
||||
std::mutex fMlock; // sessionMessages mutex
|
||||
std::vector<boost::shared_ptr<std::mutex> > fWlock; // WES socket write mutexes
|
||||
boost::mutex fMlock; // sessionMessages mutex
|
||||
std::vector<boost::shared_ptr<boost::mutex> > fWlock; // WES socket write mutexes
|
||||
bool fBusy;
|
||||
volatile uint32_t closingConnection;
|
||||
uint32_t pmCount;
|
||||
std::mutex fOnErrMutex; // to lock function scope to reset pmconnections under error condition
|
||||
boost::mutex fOnErrMutex; // to lock function scope to reset pmconnections under error condition
|
||||
|
||||
std::mutex ackLock;
|
||||
boost::mutex ackLock;
|
||||
|
||||
public:
|
||||
enum
|
||||
|
Reference in New Issue
Block a user