mirror of
https://github.com/MariaDB/server.git
synced 2025-08-27 13:04:36 +03:00
BUG#13987 Cluster: Loss of data nodes can cause high CPU usage from ndb_mgmd
smaller patch for 5.0. complete patch going to 5.1 due to more intrusiveness for 'list sessions' etc ndb/include/mgmapi/mgmapi.h: add internal get_fd to use in test ndb/include/util/InputStream.hpp: - add this weird startover member to SocketInputStream - this helps work out if we've read a newline yet and should start inserting into buffer from the start ndb/src/common/util/InputStream.cpp: remove evil, add more. keep track internally we've retrieved a newline yet (m_startover) ndb/src/common/util/Parser.cpp: change way detecting of NoLine remove some trailing whitespace that was uglying the place up a bit ndb/src/common/util/socket_io.cpp: Always retrieve data from the OS so that we instantly get EOF on disconnect and don't end up spinning looking for a newline. ndb/src/mgmapi/mgmapi.cpp: add internal ndb_mgm_get_fd() for internal testing handle 'node status' a bit better ndb/test/ndbapi/testMgm.cpp: Add test for MgmApiSession disconnection (mgmd at 100%) not fully automated due to smaller patch for 5.0 will be complete in 5.1
This commit is contained in:
@@ -40,6 +40,7 @@ extern FileInputStream Stdin;
|
||||
class SocketInputStream : public InputStream {
|
||||
NDB_SOCKET_TYPE m_socket;
|
||||
unsigned m_timeout;
|
||||
bool m_startover;
|
||||
public:
|
||||
SocketInputStream(NDB_SOCKET_TYPE socket, unsigned readTimeout = 1000);
|
||||
char* gets(char * buf, int bufLen);
|
||||
|
Reference in New Issue
Block a user