db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r447375 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Date Mon, 18 Sep 2006 11:41:38 GMT
Author: kahatlen
Date: Mon Sep 18 04:41:37 2006
New Revision: 447375

URL: http://svn.apache.org/viewvc?view=rev&rev=447375
Log:
DERBY-1326 (partial) Network server may abandon sessions when Derby
system is shutdown and this causes intermittent hangs in the client

Don't poison the network server's worker threads when an engine
shutdown is detected. Poisoning the threads could lead to abandoning
of sessions and hangs in the client.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?view=diff&rev=447375&r1=447374&r2=447375
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
(original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Mon Sep 18 04:41:37 2006
@@ -752,11 +752,12 @@
 							runQueue.clear();
 						}
 
-						// Close and remove DRDAConnThreads on threadList.
-						for (int i = 0; i < threadList.size(); i++)
-							((DRDAConnThread)threadList.get(i)).close();
-						threadList.clear();
-						freeThreads = 0;
+						// DERBY-1326: There could be active threads that
+						// contain old/invalid sessions. These sessions won't
+						// be cleaned up until there is some activity on
+						// them. We could optimize this by going through
+						// sessionTable and closing the sessions' socket
+						// streams.
 
 						// Unload driver, then restart the server.
 						cloudscapeDriver = null;	// so it gets collected.



Mime
View raw message