1
0
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:
Patrick LeBlanc
2019-07-18 11:14:12 -05:00
parent 43f7a71bad
commit 7d4f406888
2 changed files with 32 additions and 5 deletions

View File

@ -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;
}