Skip to content

Commit fcdc7e8

Browse files
committed
Fix the releaseIdleCounter is incorrect.
Fix the releaseIdleCounter does not increment when testAllIdle releases them. Pull request #241 provided by Arun Chaitanya Miriappalli
1 parent 51fabe9 commit fcdc7e8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,7 @@ public void testAllIdle() {
11421142
continue;
11431143
}
11441144
if (!con.validate(PooledConnection.VALIDATE_IDLE)) {
1145+
releasedIdleCount.incrementAndGet();
11451146
idle.remove(con);
11461147
release(con);
11471148
}

webapps/docs/changelog.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@
151151
</subsection>
152152
<subsection name="jdbc-pool">
153153
<changelog>
154+
<fix>
155+
Fix the <code>releaseIdleCounter</code> does not increment when testAllIdle
156+
releases them. Pull request <pr>241</pr> provided by Arun Chaitanya Miriappalli
157+
(lihan)
158+
</fix>
154159
<fix>
155160
Fix the <code>ConnectionState</code> state will be inconsistent with actual
156161
state on the connection when an exception occurs while writing. Pull request

0 commit comments

Comments
 (0)