You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/01/25 09:45:17 UTC

[jira] [Resolved] (CAMEL-5994) CamelJob implementation rely on some inconsistent endpoints LRU cache - Camel endpoints may not be called on quartz fire after some days of uptime

     [ https://issues.apache.org/jira/browse/CAMEL-5994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5994.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.11.0
                   2.10.4
                   2.9.6

Thank guys for help with fixing this issue
                
> CamelJob implementation rely on some inconsistent endpoints LRU cache - Camel endpoints may not be called on quartz fire after some days of uptime
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5994
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5994
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-quartz
>    Affects Versions: 2.9.5, 2.10.3
>         Environment: Quartz is in deployed in cluster mode.
>            Reporter: Alexis Kinsella
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 2.9.6, 2.10.4, 2.11.0
>
>         Attachments: CamelJob.java, QuartzCronRouteWithSmallCacheTest.java
>
>
> CamelJobs rely on some endpoints LRU cache from camel context. If i'm not wrong, since LRU Cache relies on SoftReferences, Garbage Collector can decide to evict some entries and especially QuartzEndpoints.
> It happens that sometimes endpoints evicted from LRU Caches are QuartzEndpoints. Since QuartzEnpoints are searched from CamelJob in LRU cache, they are not reachable anymore.
> The side effect, is that CamelJob isntance initializes a new QuartzEndpoint, but loadbalancer is not initialized since it is initialized from QuartzConsumer.
> The result is that quartz triggers jobs that instanciate Quartz endpoints with unintialized load balancers which are unable to call processor from the routes associated.
> I have joined a fix that rely on the search of QuartzEndpoints from initalized routes of Camel context.
> Fundamentally, the search of endpoints should not rely on endpoints LRU cache. It is a broken design.
> Hope it helps.
> By the way, there are other issues related to QuartzEndpoint load balancer initalization: If quartz starts before startup of Camel routes you will have the same issue: Correctly initialized QuartzEndpoints are not in LRU cache since Camel has not started routes (and so endpoints and consumers). Quartz will trigger job, and camel job will search for QuartzEndpoint and put it in LRUCache with uninitialized load balancer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira