Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 97710 invoked from network); 18 Sep 2006 11:42:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2006 11:42:28 -0000 Received: (qmail 12804 invoked by uid 500); 18 Sep 2006 11:42:28 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 12734 invoked by uid 500); 18 Sep 2006 11:42:28 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 12720 invoked by uid 99); 18 Sep 2006 11:42:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 04:42:28 -0700 Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 04:42:27 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id B94871A981A; Mon, 18 Sep 2006 04:41:38 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: derby-commits@db.apache.org From: kahatlen@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060918114138.B94871A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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.