[ 
https://issues.apache.org/jira/browse/KAFKA-8020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16785201#comment-16785201
 ] 

ASF GitHub Bot commented on KAFKA-8020:
---------------------------------------

ConcurrencyPractitioner commented on pull request #6376: [KAFKA-8020] Consider 
making ThreadCache a TLRUCache
URL: https://github.com/apache/kafka/pull/6376
 
 
   We are implementing an time-aware LRU Cache to supplant the NamedCache 
currently used by Kafka Streams.
   
   The tests will be modified to check to see that entries which have their 
life time expired will be removed first. 
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Consider changing design of ThreadCache 
> ----------------------------------------
>
>                 Key: KAFKA-8020
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8020
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: Richard Yu
>            Priority: Major
>
> In distributed systems, time-aware LRU Caches offers a superior eviction 
> policy better than traditional LRU models, having more cache hits than 
> misses. In this new policy, if an item is stored beyond its useful lifespan, 
> then it is removed. For example, in {{CachingWindowStore}}, a window usually 
> is of limited 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)

Reply via email to