You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "John Ellis (JIRA)" <ji...@apache.org> on 2010/08/25 05:25:47 UTC

[jira] Created: (CAMEL-3077) Cache Component needs to check for null values during GET operations

Cache Component needs to check for null values during GET operations
--------------------------------------------------------------------

                 Key: CAMEL-3077
                 URL: https://issues.apache.org/activemq/browse/CAMEL-3077
             Project: Apache Camel
          Issue Type: Bug
    Affects Versions: 2.4.0
         Environment: Received 2.4.0 release of Camel and Camel Cache component from Maven repo
            Reporter: John Ellis
         Attachments: CacheProducer.NPE.patch

EhCache often has a bit of lag time when invalidating expired cache elements, first setting the Element value to null and then removing the key. If you are hitting a cache rapidly one often will run across a key that is present in the cache that still has a null element entry.

The logic for successfully key retrieval just needs to be slightly tweaked to check for null values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-3077) Cache Component needs to check for null values during GET operations

Posted by "John Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61391#action_61391 ] 

John Ellis commented on CAMEL-3077:
-----------------------------------

If it helps, steps to reproduce:
1) Set timeToLiveSeconds to something like 30 seconds
2) Add an entry in a route
3) Wait 30-ish seconds
4) Attempt to make several GETs around the expiry time. One will likely result in an NPE as the entry is being removed by the EhCache monitor

> Cache Component needs to check for null values during GET operations
> --------------------------------------------------------------------
>
>                 Key: CAMEL-3077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3077
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>         Environment: Received 2.4.0 release of Camel and Camel Cache component from Maven repo
>            Reporter: John Ellis
>         Attachments: CacheProducer.NPE.patch
>
>
> EhCache often has a bit of lag time when invalidating expired cache elements, first setting the Element value to null and then removing the key. If you are hitting a cache rapidly one often will run across a key that is present in the cache that still has a null element entry.
> The logic for successfully key retrieval just needs to be slightly tweaked to check for null values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-3077) Cache Component needs to check for null values during GET operations

Posted by "John Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Ellis updated CAMEL-3077:
------------------------------

    Attachment: CacheProducer.NPE.patch

> Cache Component needs to check for null values during GET operations
> --------------------------------------------------------------------
>
>                 Key: CAMEL-3077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3077
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>         Environment: Received 2.4.0 release of Camel and Camel Cache component from Maven repo
>            Reporter: John Ellis
>         Attachments: CacheProducer.NPE.patch
>
>
> EhCache often has a bit of lag time when invalidating expired cache elements, first setting the Element value to null and then removing the key. If you are hitting a cache rapidly one often will run across a key that is present in the cache that still has a null element entry.
> The logic for successfully key retrieval just needs to be slightly tweaked to check for null values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-3077) Cache Component needs to check for null values during GET operations

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-3077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-3077.
--------------------------------

         Assignee: Claus Ibsen
    Fix Version/s: 2.5.0
       Resolution: Fixed

trunk: 989026.

Thanks for the patch.

> Cache Component needs to check for null values during GET operations
> --------------------------------------------------------------------
>
>                 Key: CAMEL-3077
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-3077
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>         Environment: Received 2.4.0 release of Camel and Camel Cache component from Maven repo
>            Reporter: John Ellis
>            Assignee: Claus Ibsen
>             Fix For: 2.5.0
>
>         Attachments: CacheProducer.NPE.patch
>
>
> EhCache often has a bit of lag time when invalidating expired cache elements, first setting the Element value to null and then removing the key. If you are hitting a cache rapidly one often will run across a key that is present in the cache that still has a null element entry.
> The logic for successfully key retrieval just needs to be slightly tweaked to check for null values.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.