This commit is contained in:
WuTaoyu 2025-07-28 14:52:22 +08:00 committed by GitHub
commit dba99c0636
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -3149,6 +3149,9 @@ public class DruidDataSource extends DruidAbstractDataSource
// shrink connections by HotSpot intrinsic function _arraycopy for performance optimization. // shrink connections by HotSpot intrinsic function _arraycopy for performance optimization.
int removeCount = evictCount + keepAliveCount; int removeCount = evictCount + keepAliveCount;
if (removeCount > poolingCount) {
removeCount = poolingCount;
}
if (removeCount > 0) { if (removeCount > 0) {
int breakedCount = poolingCount - i; int breakedCount = poolingCount - i;
if (breakedCount > 0) { if (breakedCount > 0) {
@ -3253,7 +3256,9 @@ public class DruidDataSource extends DruidAbstractDataSource
lock.lock(); lock.lock();
try { try {
int fillCount = minIdle - (activeCount + poolingCount + createTaskCount); int fillCount = minIdle - (activeCount + poolingCount + createTaskCount);
if (fillCount > 0) {
emptySignal(fillCount); emptySignal(fillCount);
}
} finally { } finally {
lock.unlock(); lock.unlock();
} }