Commit a8e426d2 authored by unknown's avatar unknown

BUG#11132 Connections stuck in CLOSE_WAIT

This fixes the problem in 5.0 in the correct way.

The previous patch (for 4.1) is only valid for 4.1 and is done at the right time
for 4.1.


ndb/src/kernel/main.cpp:
  The ndbd angel process keeps the mgm connection open as it retains a reference
  to the socket.
  
  this means that when the mgm server is killed, the socket stays in CLOSE_WAIT 
  (the ndb process will close() it okay in 5.0, as we reused it for a transporter
  but this isn't enough as the angel process still has a reference to that socket).
  
  so, by adding in a theConfig->closeConfiguration(); in the angel process, the ndb
  process is left with the only reference to the socket - which it can close whenever
  it likes (namely when the connection is terminated).
parent 0305a34a
......@@ -101,6 +101,12 @@ int main(int argc, char** argv)
*/
catchsigs(true);
/**
* We no longer need the mgm connection in this process
* (as we are the angel, not ndb)
*/
theConfig->closeConfiguration();
int status = 0;
while(waitpid(child, &status, 0) != child);
if(WIFEXITED(status)){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment