[
https://issues.apache.org/jira/browse/CAMEL-19759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17756843#comment-17756843
]
Rhuan Rocha commented on CAMEL-19759:
-------------------------------------
Hi [~orpiske]
Line 188 calls the cleanUp for each Pool instance inside the pool.
{code:java}
public void cleanUp() {
if (cache instanceof LRUCache) {
((LRUCache) cache).cleanUp();
}
pool.values().forEach(Pool::cleanUp);
} {code}
However, the SinglePool manipulates the singlePoolEvicted and is cleaning the
map at the cleanupEvicts method.
{code:java}
@Override
public void cleanUp() {
cleanupEvicts();
}
private void cleanupEvicts() {
if (!singlePoolEvicted.isEmpty()) {
for (Map.Entry<Endpoint, Pool<S>> entry : singlePoolEvicted.entrySet())
{
Endpoint e = entry.getKey();
Pool<S> p = entry.getValue();
doStop(e);
p.stop();
singlePoolEvicted.remove(e);
}
}
} {code}
With this, my understanding is that if the pool has at least one instance of
SinglePool, then the singlePoolEvicted will be cleared twice.
I said "It looks like lines 192 and 193 are not needed" and I'm not correct,
however, looks like to me it has some cases that the singlePoolEvicted can be
cleaned many times.
I'm uncertain about placing the cleanupEvicts within the SinglePool. It seems
to me that the responsibility for cleaning the singlePoolEvicted should not lie
with the SinglePool.
> performance: Camel is hanging up during shutdown
> ------------------------------------------------
>
> Key: CAMEL-19759
> URL: https://issues.apache.org/jira/browse/CAMEL-19759
> Project: Camel
> Issue Type: Bug
> Affects Versions: 3.20.6
> Reporter: Otavio Rodolfo Piske
> Assignee: Otavio Rodolfo Piske
> Priority: Major
> Attachments: dump3.hprof, jstack-3.20.4.txt, jstack.txt
>
>
> Under high load, Camel is taking a very long time to shutdown. The
> investigation points to something happening while the ServicePool is stopping.
> Note: this problem is still under investigation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)