You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by matt <go...@gmail.com> on 2018/06/27 14:02:19 UTC
Leftover Ignite threads after closing cache
Hi,
I'm using an Ignite ContinuousQuery for processing local cache events:
continuousQuery.setLocalListener(new CacheEntryListener<>(myHandler));
I have a "job" that modifies the cache (insert/updates/deletes) and the code
in the callback essentially takes items and enqueues them for further
processing by another thread. After the "job" finishes, I close the cache,
but even after several minutes I see several of these in my thread dump:
"callback-#70%conn-rpc-ignite%@11381" prio=5 tid=0xcc nid=NA waiting
java.lang.Thread.State: WAITING
at sun.misc.Unsafe.park(Unsafe.java:-1)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
My Ignite name is "conn-rpc-ignite", which you can see in the thread name. I
also found a unit test that references of the "callback-" thread name prefix
here:
https://github.com/apache/ignite/blob/f2f82f09b35368f25e136c9fce5e7f2198a91171/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryAsyncFilterRandomOperationTest.java
and here:
https://github.com/apache/ignite/blob/9a4a145be514e650258715a7e682d427d5812d16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
So my question is - should I be concerned about these threads hanging around
in WAITING status? Is there a way to clean them up, or are these just lazily
created and re-used later on?
Thanks!
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Leftover Ignite threads after closing cache
Posted by matt <go...@gmail.com>.
Good to know, thanks!
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Leftover Ignite threads after closing cache
Posted by akurbanov <an...@gmail.com>.
Hi Matt,
These threads are async callback thread pool, you shouldn't worry about
them. This internal thread pool is not bound to a single cache and is being
reused for all async callbacks for all continuous queries. Ignite will
shutdown this pool only when you stop the node.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/