camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Padmanaban (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-8557) The entire LRU Cache is cleared on eviction of a single entry
Date Thu, 26 Mar 2015 13:48:52 GMT

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

Padmanaban updated CAMEL-8557:
------------------------------
    Description: 
Use Case:
Using Sftp End point to poll remote directory
Set the following attributes in uri
noop=true 
idempotent=true
idempotentRepository=#idemRep

where #idemRep is defined in context xml as below

 <bean id="idemRep" class="org.apache.camel.processor.idempotent.MemoryIdempotentRepository">
       <property name="cacheSize" value="10"  />
    </bean>

The number of files in the remote directory is more than 10.

In the above scenario, while trying to add 11th entry into the map, the eldest entry is evicted
as expected but soon after the eviction the LRUCache.onEviction clears cache, which i am wondering
is not the expected behavior of LRU Cache.

This happens because LRUCache.stopOnEviction is always set to true during the LRUCache instantiation
which triggers ServiceHelper.stopService on eviction.

 I am trying to understand why we need to reset the cache on eviction.

  was:
Use Case:
Using Sftp End point to poll remote directory
Set the following attributes in uri
noop=true 
idempotent=true
idempotentRepository=#idemRep

where #idemRep is defined in context xml as below

 <bean id="idemRep" class="org.apache.camel.processor.idempotent.MemoryIdempotentRepository">
       <property name="cacheSize" value="10"  />
    </bean>

The number of files in the remote directory is more than 10.

In the above scenario, while trying to add 11th entry in to map, the eldest entry is evicted
as expected but soon after the eviction the LRUCache.onEviction clears cache, which i am wondering
is not the expected behavior of LRU Cache.

This happens because LRUCache.stopOnEviction is always set to true during the LRUCache instantiation
which triggers ServiceHelper.stopService on eviction.

 I am trying to understand why we need to reset the cache on eviction.


> The entire LRU Cache is cleared on eviction of a single entry
> -------------------------------------------------------------
>
>                 Key: CAMEL-8557
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8557
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.2
>         Environment: Camel 2.12.2, concurrentlinkedhashmap - 1.2 
>            Reporter: Padmanaban
>            Priority: Minor
>
> Use Case:
> Using Sftp End point to poll remote directory
> Set the following attributes in uri
> noop=true 
> idempotent=true
> idempotentRepository=#idemRep
> where #idemRep is defined in context xml as below
>  <bean id="idemRep" class="org.apache.camel.processor.idempotent.MemoryIdempotentRepository">
>        <property name="cacheSize" value="10"  />
>     </bean>
> The number of files in the remote directory is more than 10.
> In the above scenario, while trying to add 11th entry into the map, the eldest entry
is evicted as expected but soon after the eviction the LRUCache.onEviction clears cache, which
i am wondering is not the expected behavior of LRU Cache.
> This happens because LRUCache.stopOnEviction is always set to true during the LRUCache
instantiation which triggers ServiceHelper.stopService on eviction.
>  I am trying to understand why we need to reset the cache on eviction.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message