[ 
http://issues.apache.org/jira/browse/DERBY-1326?page=comments#action_12414508 ] 

Deepa Remesh commented on DERBY-1326:
-------------------------------------

Hi Bryan, I don't think you are being picky. After reading your explanation, I 
agree the combined patch still has some chance of causing a hang. As you 
explain, the following need not be always true: "The interrupt calls and the 
added synchronization assure that freeThreads will become 0 before we start 
accepting new sessions ". So the assumption that we will have the right value 
for freeThreads (=0) when a new session comes in after a restart does not hold 
good. 

Keeping the code to reset "freeThreads = 0" during restart seems to be an 
option. But that will cause the problem that you describe under "freeThreads 
counter maintenance" in 
http://wiki.apache.org/db-derby/NetworkServerSessionManagement. The counter can 
become negative. 

If we plan to use this patch, we need to find out some way to ensure 
freeThreads counter is maintained correctly. 











> Network server may abandon sessions when Derby system is shutdown and this 
> causes intermittent hangs in the client
> ------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-1326
>          URL: http://issues.apache.org/jira/browse/DERBY-1326
>      Project: Derby
>         Type: Bug

>   Components: Network Server
>     Reporter: Deepa Remesh
>     Assignee: Bryan Pendleton
>  Attachments: repro1326.java, sessionMgmt1.diff, 
> sessionMgmt1_and_nosessionsforclosedthreads.diff
>
> This issue was found when working on DERBY-1219. More details can be found in 
> the comments at http://issues.apache.org/jira/browse/DERBY-1219

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to