Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3.13, 10.3.14, 10.3.15
-
None
-
Windows
Description
On Windows, sometimes slave stops unexpectedlly. log shows the following error.
> 2019-05-30 3:21:55 6 [ERROR] Semisync slave socket fd is 580. select()
> cannot handle if the socket fd is greater than 64 (FD_SETSIZE).
> 2019-05-30 3:21:55 6 [Note] Stopping ack receiver thread
Searched MariaDB implementation, above log message is printed here.
#ifndef WINDOWS
|
if (socket_id > FD_SETSIZE) |
{
|
sql_print_error("Semisync slave socket fd is %u. " |
"select() cannot handle if the socket fd is " |
"greater than %u (FD_SETSIZE).", socket_id, FD_SETSIZE); |
return 0; |
}
|
#endif //WINDOWS |
It seems that #ifndef WINDOWS is incorrect, it should be _WIN32.
Because of incorrect #ifndef definition, needless check is executed on Windows.
It seems that master can't receive ack from slave, slave waits until master response, then it causes timeout and disconnect connection.(maybe)
In contrast to MySQL case, it uses _WIN32.
#ifndef _WIN32
|
if (socket_id > FD_SETSIZE) { |
LogErr(ERROR_LEVEL, ER_SEMISYNC_FAILED_TO_HANDLE_SOCKET, socket_id,
|
FD_SETSIZE);
|
return false; |
}
|
#endif // _WIN32 |