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
Bigger better fix for access to R/W nodes only
This commit is contained in:
@@ -350,7 +350,7 @@ int DMLPackageProcessor::rollBackTransaction(uint64_t uniqueId, BRM::TxnID txnID
|
|||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (msgRecived == fWEClient->getPmCount())
|
if (msgRecived == fWEClient->getRWConnections())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
fWEClient->read(uniqueId, bsIn);
|
fWEClient->read(uniqueId, bsIn);
|
||||||
|
@@ -310,6 +310,11 @@ void WEClients::Setup()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WEClient::isConectionReadonly(uint32_t connection)
|
||||||
|
{
|
||||||
|
return fPmConnections[connection] == nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
int WEClients::Close()
|
int WEClients::Close()
|
||||||
{
|
{
|
||||||
makeBusy(false);
|
makeBusy(false);
|
||||||
@@ -502,9 +507,9 @@ void WEClients::write(const messageqcpp::ByteStream& msg, uint32_t connection)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// new behavior: connection client is nullptr means it is read-only.
|
// new behavior: connection client is nullptr means it is read-only.
|
||||||
// ostringstream os;
|
ostringstream os;
|
||||||
// os << "Lost connection to WriteEngineServer on pm" << connection;
|
os << "Connection to readonly pm" << connection;
|
||||||
// throw runtime_error(os.str());
|
throw runtime_error(os.str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -114,6 +114,18 @@ class WEClients
|
|||||||
return pmCount;
|
return pmCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t getRWConnections()
|
||||||
|
{
|
||||||
|
uint32_t count = 0;
|
||||||
|
for (uint32_t i = 0; i < fPmConnections.size(); i++)
|
||||||
|
{
|
||||||
|
count += fPmConnections[i] != nullptr;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool connectionIsReadonly(uint32_t connection);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WEClients(const WEClients& weClient);
|
WEClients(const WEClients& weClient);
|
||||||
WEClients& operator=(const WEClients& weClient);
|
WEClients& operator=(const WEClients& weClient);
|
||||||
|
Reference in New Issue
Block a user