On 13/06/2012 23:22, Konstantin Kolinko wrote:
> 2012/6/13  <ma...@apache.org>:
>> Author: markt
>> Date: Wed Jun 13 18:29:07 2012
>> New Revision: 1349984
>>
>> URL: http://svn.apache.org/viewvc?rev=1349984&view=rev
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53173
>> Remove some duplicate calls to countDownConnection()
>> While the connector is running, destroySocket() will call 
>> countDownConnection()
>> Once the connector is stopped, the latch is removed so it does not matter 
>> that destroySocket() does not call countDownConnection() in that case
> 
> 
> It seems that this commit has not been merged to 7.0 yet.

I'll do that shortly.

> Looking at AprEndpoint#processSocketWithOptions(..) it looks that it
> should return false when "running" flag is false. It does not matter
> with the current code though.
> 
> 
>> Once the connector is stopped, the latch is removed so it does not matter 
>> that destroySocket() does not call countDownConnection() in that case
> 
> Maybe mention the above rationale in a comment in 
> AprEndpoint#destroySocket(..)?

+1

> In my understanding the reason why we do not countdown here is that it
> is known that no new connections will be allowed, so there is no need
> to maintain the counter that limits new connections.

Exactly. The code goes further and removes the latch as soon as stop is
called.

> It might be nice to amend test cases to check that connection counter
> goes back to 0 after Tomcat shuts down, but it probably never happens.
> Skipping countdown in destroySocket is one reason why such a test may
> return false results.

Could be tricky given that the latch is removed.

> Rainer mentioned that he observed "Incorrect connection count" warning
> with BIO connector, but only once (in
> "tcn-tc-ant_test-bio.out-1.1.24.sles10.x86_64:1"). The cause is still
> unknown.

Yep - still on the todo list but not as urgent and not blocking a 7.0.28
release.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to