Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
195de851
Commit
195de851
authored
19 years ago
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
making sure that the client connect loop and server accept is stopped early at ndbd shutdown
parent
6c7e13de
Branches unavailable
Tags unavailable
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
11 deletions
+21
-11
ndb/src/kernel/main.cpp
ndb/src/kernel/main.cpp
+2
-9
ndb/src/kernel/vm/Emulator.cpp
ndb/src/kernel/vm/Emulator.cpp
+17
-1
ndb/src/kernel/vm/Emulator.hpp
ndb/src/kernel/vm/Emulator.hpp
+2
-1
No files found.
ndb/src/kernel/main.cpp
View file @
195de851
...
...
@@ -183,11 +183,9 @@ int main(int argc, char** argv)
assert
(
"Illegal state globalData.theRestartFlag"
==
0
);
}
SocketServer
socket_server
;
globalTransporterRegistry
.
startSending
();
globalTransporterRegistry
.
startReceiving
();
if
(
!
globalTransporterRegistry
.
start_service
(
socket_server
)){
if
(
!
globalTransporterRegistry
.
start_service
(
*
globalEmulatorData
.
m_
socket_server
)){
ndbout_c
(
"globalTransporterRegistry.start_service() failed"
);
exit
(
-
1
);
}
...
...
@@ -199,7 +197,7 @@ int main(int argc, char** argv)
globalEmulatorData
.
theWatchDog
->
doStart
();
socket_server
.
startServer
();
globalEmulatorData
.
m_socket_server
->
startServer
();
// theConfig->closeConfiguration();
...
...
@@ -207,11 +205,6 @@ int main(int argc, char** argv)
NdbShutdown
(
NST_Normal
);
socket_server
.
stopServer
();
socket_server
.
stopSessions
();
globalTransporterRegistry
.
stop_clients
();
return
NRT_Default
;
}
...
...
This diff is collapsed.
Click to expand it.
ndb/src/kernel/vm/Emulator.cpp
View file @
195de851
...
...
@@ -68,6 +68,7 @@ EmulatorData::EmulatorData(){
theThreadConfig
=
0
;
theSimBlockList
=
0
;
theShutdownMutex
=
0
;
m_socket_server
=
0
;
}
void
...
...
@@ -83,6 +84,7 @@ EmulatorData::create(){
theWatchDog
=
new
WatchDog
();
theThreadConfig
=
new
ThreadConfig
();
theSimBlockList
=
new
SimBlockList
();
m_socket_server
=
new
SocketServer
();
theShutdownMutex
=
NdbMutex_Create
();
...
...
@@ -99,7 +101,8 @@ EmulatorData::destroy(){
delete
theThreadConfig
;
theThreadConfig
=
0
;
if
(
theSimBlockList
)
delete
theSimBlockList
;
theSimBlockList
=
0
;
if
(
m_socket_server
)
delete
m_socket_server
;
m_socket_server
=
0
;
NdbMem_Destroy
();
}
...
...
@@ -195,9 +198,22 @@ NdbShutdown(NdbShutdownType type,
fclose
(
outputStream
);
#endif
/**
* Stop all transporter connection attempts and accepts
*/
globalEmulatorData
.
m_socket_server
->
stopServer
();
globalEmulatorData
.
m_socket_server
->
stopSessions
();
globalTransporterRegistry
.
stop_clients
();
/**
* Stop transporter communication with other nodes
*/
globalTransporterRegistry
.
stopSending
();
globalTransporterRegistry
.
stopReceiving
();
/**
* Remove all transporters
*/
globalTransporterRegistry
.
removeAll
();
#ifdef VM_TRACE
...
...
This diff is collapsed.
Click to expand it.
ndb/src/kernel/vm/Emulator.hpp
View file @
195de851
...
...
@@ -55,6 +55,7 @@ struct EmulatorData {
class
WatchDog
*
theWatchDog
;
class
ThreadConfig
*
theThreadConfig
;
class
SimBlockList
*
theSimBlockList
;
class
SocketServer
*
m_socket_server
;
/**
* Constructor
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment