camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Commented] (CAMEL-9826) MongoDB consumer could potentially block during shutdown
Date Thu, 07 Apr 2016 05:47:25 GMT


Claus Ibsen commented on CAMEL-9826:

You got a CPU that is spiking in the while loop keep running at that line 132
"main" #1 prio=5 os_prio=31 tid=0x00007fa3a2003000 nid=0x1703 runnable [0x0000700000218000]
   java.lang.Thread.State: RUNNABLE
	at org.apache.camel.component.mongodb.MongoDbTailingProcess.stop(
	at org.apache.camel.component.mongodb.MongoDbTailableCursorConsumer.doStop(
	at org.apache.camel.util.ServiceHelper.stopService(
	at org.apache.camel.impl.DefaultShutdownStrategy.shutdownNow(
	at org.apache.camel.impl.DefaultShutdownStrategy.shutdownRoutesNow(
	at org.apache.camel.impl.DefaultShutdownStrategy.doShutdown(
	at org.apache.camel.impl.DefaultShutdownStrategy.shutdownForced(
	at org.apache.camel.impl.DefaultCamelContext.doStop(
	- locked <0x0000000795e68a70> (a org.apache.camel.spring.SpringCamelContext)

Using the concurrent / thread apis with the latch and whatnot is a much better approach to
signal between threads and safely wait.
No other of the Camel components uses a endless while loop in their code.

> MongoDB consumer could potentially block during shutdown
> --------------------------------------------------------
>                 Key: CAMEL-9826
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mongodb
>            Reporter: Claus Ibsen
>             Fix For: 2.18.0
> There is this endless while loop
> This should be using a CountDownLatch to await for the stop to complete so there is no
endless while loop.

This message was sent by Atlassian JIRA

View raw message