mirror of https://github.com/alibaba/druid.git
Merge da4832aa85
into c0a58c10b7
This commit is contained in:
commit
dba99c0636
|
@ -3149,6 +3149,9 @@ public class DruidDataSource extends DruidAbstractDataSource
|
|||
|
||||
// shrink connections by HotSpot intrinsic function _arraycopy for performance optimization.
|
||||
int removeCount = evictCount + keepAliveCount;
|
||||
if (removeCount > poolingCount) {
|
||||
removeCount = poolingCount;
|
||||
}
|
||||
if (removeCount > 0) {
|
||||
int breakedCount = poolingCount - i;
|
||||
if (breakedCount > 0) {
|
||||
|
@ -3253,7 +3256,9 @@ public class DruidDataSource extends DruidAbstractDataSource
|
|||
lock.lock();
|
||||
try {
|
||||
int fillCount = minIdle - (activeCount + poolingCount + createTaskCount);
|
||||
if (fillCount > 0) {
|
||||
emptySignal(fillCount);
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue