Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
As discussed in here current version of ContainerCache is just used by BlockUtils and has several architectural issues. for example:
- It uses a ReentrantLock which could be replaced by synchronized methods
- It should maintain a referenceCount for each DBHandler
- It extends LRUMap while it would be better to hide it by the composition and not expose LRUMap related methods.
As pifta suggests, we could replace all ContainerCache functionality by using Guava LoadingCache.
This new LoadingCache could be configured to evict by size, by this configuration the functionality would be slightly different as it may evict DBHandlers while they are in use (referenceCount>0) but we can configure it to use reference base eviction based on CacheBuilder.weakValues()
I want to open this discussion here instead of Github so I created this ticket.
Attachments
Issue Links
- is fixed by
-
HDDS-3630 Merge rocksdb in datanode
- Resolved
- links to