Project: Tomcat
Bug 50613 ConnectionPool.size corruption when evictions enabled:
Reported: 2011-01-18 17:33:53 | Status: resolved fixed

When (the various forms of) eviction run on the connection pool, ConnectionPool.size goes negative. This appears to be a concurrency problem. Attached is a unit test that illustrates the issue.

Files changed in fix:
modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestSizePreservation.java