You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Changed the retry behavior in SocketPool to get load_brm to work
when called by proc???. Also made proc??? start/stop SM around save_brm runs. There seems not to be a saner way to do that atm. So, on stop/restart/shutdown, it will do 1) stop everything 2) restart SM 3) save_brm 4) stop SM again
This commit is contained in:
@ -92,13 +92,14 @@ int SocketPool::send_recv(messageqcpp::ByteStream &in, messageqcpp::ByteStream *
|
||||
const uint8_t *inbuf = in.buf();
|
||||
ssize_t err = 0;
|
||||
|
||||
/* should there be a retry limit here... */
|
||||
while (sock < 0)
|
||||
{
|
||||
sock = getSocket();
|
||||
if (sock < 0)
|
||||
{
|
||||
log(logging::LOG_TYPE_ERROR, "SocketPool::send_recv(): retrying in 5 sec...");
|
||||
sleep(5);
|
||||
//log(logging::LOG_TYPE_ERROR, "SocketPool::send_recv(): retrying in 5 sec...");
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,10 +215,12 @@ int SocketPool::getSocket()
|
||||
int saved_errno = errno;
|
||||
ostringstream os;
|
||||
char buf[80];
|
||||
os << "SocketPool::getSocket() failed to connect; got '" << strerror_r(saved_errno, buf, 80);
|
||||
os << "SocketPool::getSocket() failed to connect; got '" << strerror_r(saved_errno, buf, 80) << "'";
|
||||
cout << os.str() << endl;
|
||||
log(logging::LOG_TYPE_ERROR, os.str());
|
||||
close(clientSocket);
|
||||
errno = saved_errno;
|
||||
return -1;
|
||||
}
|
||||
return clientSocket;
|
||||
}
|
||||
|
Reference in New Issue
Block a user