1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Removed a couple unused SM config params. Added retry loop

to getting a connection.
This commit is contained in:
Patrick LeBlanc
2019-07-29 14:44:18 -05:00
parent 00158c86ec
commit 303d182d5c
3 changed files with 13 additions and 4 deletions

View File

@ -549,7 +549,6 @@
<Port>0</Port>
</QueryTele>
<StorageManager>
<Enabled>N</Enabled>
<MaxSockets>30</MaxSockets>
</StorageManager>
</Columnstore>

View File

@ -46,8 +46,10 @@ SMComm * SMComm::get()
// timesavers
#define common_exit(bs1, bs2, retCode) \
{ \
int l_errno = errno; \
buffers.returnByteStream(bs1); \
buffers.returnByteStream(bs2); \
errno = l_errno; \
return retCode; \
}

View File

@ -93,14 +93,22 @@ int SocketPool::send_recv(messageqcpp::ByteStream &in, messageqcpp::ByteStream *
ssize_t err = 0;
retry:
/* should there be a retry limit here... */
int retries = 0;
while (sock < 0)
{
sock = getSocket();
if (sock < 0)
{
//log(logging::LOG_TYPE_ERROR, "SocketPool::send_recv(): retrying in 5 sec...");
sleep(1);
if (++retries < 10)
{
//log(logging::LOG_TYPE_ERROR, "SocketPool::send_recv(): retrying in 5 sec...");
sleep(1);
}
else
{
errno = ECONNREFUSED;
return -1;
}
}
}