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.
|
// 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);
|
||||||
emptySignal(fillCount);
|
if (fillCount > 0) {
|
||||||
|
emptySignal(fillCount);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue