1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00

MCOL-4679 Using a correct id creating DEC connections

This commit is contained in:
Roman Nozdrin
2021-04-19 16:26:51 +00:00
parent ce609f7942
commit cd552d04e1

View File

@@ -278,9 +278,9 @@ void DistributedEngineComm::Setup()
// numConnections must be calculated as number of PMs * number of connections per PM. // numConnections must be calculated as number of PMs * number of connections per PM.
// This happens earlier in getNumConnections(). // This happens earlier in getNumConnections().
for (unsigned i = 0; i < numConnections; i++) for (size_t i = 0; i < numConnections; ++i)
{ {
size_t connectionId = numConnections % newPmCount; size_t connectionId = i % newPmCount;
boost::shared_ptr<MessageQueueClient> cl(new MessageQueueClient(pmsAddressesAndPorts[connectionId].first, boost::shared_ptr<MessageQueueClient> cl(new MessageQueueClient(pmsAddressesAndPorts[connectionId].first,
pmsAddressesAndPorts[connectionId].second)); pmsAddressesAndPorts[connectionId].second));
boost::shared_ptr<boost::mutex> nl(new boost::mutex()); boost::shared_ptr<boost::mutex> nl(new boost::mutex());