You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Nicolas Filotto (Jira)" <ji...@apache.org> on 2023/05/28 10:24:00 UTC
[jira] [Resolved] (CAMEL-19397) SimpleLRUCache is not thread-safe
[ https://issues.apache.org/jira/browse/CAMEL-19397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Filotto resolved CAMEL-19397.
-------------------------------------
Resolution: Duplicate
Thank for reporting, it is a known issue already fixed
> SimpleLRUCache is not thread-safe
> ---------------------------------
>
> Key: CAMEL-19397
> URL: https://issues.apache.org/jira/browse/CAMEL-19397
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 3.20.5, 4.0-M3
> Reporter: Alexandru Neaţă
> Priority: Minor
>
> SimpleLRUCache is not thread-safe, but it is used in various multi-threaded places.
> Examples are several [IdempotentRepository|https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/spi/IdempotentRepository.java] implementations as:
> * [MemoryIdempotentRepository|https://github.com/apache/camel/blob/main/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/MemoryIdempotentRepository.java#L41]
> * [FileIdempotentRepository|https://github.com/apache/camel/blob/main/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/FileIdempotentRepository.java#L93]
> * [KafkaIdempotentRepository|https://github.com/apache/camel/blob/camel-3.20.x/components/camel-kafka/src/main/java/org/apache/camel/processor/idempotent/kafka/KafkaIdempotentRepository.java#L269]
> The problem with these is that the size limit of the cache is not respected (we have a memory leak).
> To reproduce the bug, the following sample project can be used: [https://github.com/alex-nt/issues-java/tree/main/camel/kafka-idempotent]
> Discussion about the issue can be read here: [https://camel.zulipchat.com/#narrow/stream/257298-camel/topic/Kafka.20idempotent.20Repository.20not.20threadsafe]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)