diff options
author | jonas@perch.ndb.mysql.com <> | 2006-05-19 09:59:34 +0200 |
---|---|---|
committer | jonas@perch.ndb.mysql.com <> | 2006-05-19 09:59:34 +0200 |
commit | 1662badd25be77f466f5e522d9c3fb22b7e02e7a (patch) | |
tree | da7d0c4c85308daedb4839c56aa5fb44c5057caa /ndb/include | |
parent | fddbcb2bf8333d072c969c0662aff799847bf369 (diff) | |
download | mariadb-git-1662badd25be77f466f5e522d9c3fb22b7e02e7a.tar.gz |
ndb - bug#19930
Add mutex surronding sessions, as ndb_mgmd now actively tries to go and "purge stale sessions"
Diffstat (limited to 'ndb/include')
-rw-r--r-- | ndb/include/util/SocketServer.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ndb/include/util/SocketServer.hpp b/ndb/include/util/SocketServer.hpp index c21673f932a..ea709bfecae 100644 --- a/ndb/include/util/SocketServer.hpp +++ b/ndb/include/util/SocketServer.hpp @@ -105,7 +105,8 @@ public: void stopSessions(bool wait = false); void foreachSession(void (*f)(Session*, void*), void *data); - + void checkSessions(); + private: struct SessionInstance { Service * m_service; @@ -116,12 +117,13 @@ private: Service * m_service; NDB_SOCKET_TYPE m_socket; }; - MutexVector<SessionInstance> m_sessions; + NdbLockable m_session_mutex; + Vector<SessionInstance> m_sessions; MutexVector<ServiceInstance> m_services; unsigned m_maxSessions; void doAccept(); - void checkSessions(); + void checkSessionsImpl(); void startSession(SessionInstance &); /** |