You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Richard Yu (JIRA)" <ji...@apache.org> on 2019/03/01 03:41:00 UTC

[jira] [Updated] (KAFKA-8020) Consider making ThreadCache a time-aware LRU Cache

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

Richard Yu updated KAFKA-8020:
------------------------------
    Description: Currently, in Kafka Streams, ThreadCache is used to store {{InternalProcessorContexts.}}Typically, these entries are needed for only a limited time span. For example, in {{CachingWindowStore}}, a window is of fixed size. After it expires, it would no longer be queried for, but it potentially could stay in the ThreadCache for an unnecessary amount of time if it is not evicted (i.e. the number of entries being inserted is few). For better allocation of memory, it would be better if we implement a time-aware LRU Cache which takes into account the lifespan of an entry and removes it once it has expired.   (was: Currently, in Kafka Streams, ThreadCache is used to store {{InternalProcessorContext}}s. Typically, these entries apply for only a limited time span. For example, in {{CachingWindowStore}}, a window is of fixed size. After it expires, it would no longer be queried for, but it potentially could stay in the ThreadCache for an unnecessary amount of time if it is not evicted (i.e. the number of entries being inserted is few). For better allocation of memory, it would be better if we implement a time-aware LRU Cache which takes into account the lifespan of an entry and removes it once it has expired. )

> Consider making ThreadCache a time-aware LRU Cache
> --------------------------------------------------
>
>                 Key: KAFKA-8020
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8020
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: Richard Yu
>            Priority: Major
>
> Currently, in Kafka Streams, ThreadCache is used to store {{InternalProcessorContexts.}}Typically, these entries are needed for only a limited time span. For example, in {{CachingWindowStore}}, a window is of fixed size. After it expires, it would no longer be queried for, but it potentially could stay in the ThreadCache for an unnecessary amount of time if it is not evicted (i.e. the number of entries being inserted is few). For better allocation of memory, it would be better if we implement a time-aware LRU Cache which takes into account the lifespan of an entry and removes it once it has expired. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)