HDDS-5791. Use Guava Cache to replace current ResourceLimitCache for stateMachineDataCache#2694
HDDS-5791. Use Guava Cache to replace current ResourceLimitCache for stateMachineDataCache#2694ChenSammi wants to merge 4 commits intoapache:masterfrom
Conversation
lokeshj1703
left a comment
There was a problem hiding this comment.
@ChenSammi Thanks for working on this! Please find my comments below.
- Guava cache may not provide us the consistency guarantees we need for stateMachineData cache. For instance we must make sure that cache entry is evicted only after majority servers have written the data. But by limiting the number of entries in the guava cache any future addition of entries would lead to eviction of older entries. Ref: https://issues.apache.org/jira/browse/HDDS-2542 - We had seen a race condition earlier between read and write stateMachineData
- The expiry time of 15mins after access might lead to retention of chunks for a longer time. This could increase the memory footprint of datanode.
|
@ChenSammi , i think we need much finer control over sizing as well eviction strategy here. Simple guava cache has not worked earlier as well. Eviction has to be controlled based on how the threshold of difference between majority and min index for datanode look like. Let's hold on this patch for now and let's discuss other alternatives. |
|
opened #2704 for resorting to commit index based eviction policy. |
@lokeshj1703 , thanks for the feedback. Didn't notice that GuavaCache is used before HDDS-2542. |
|
Closing this as alternate solutions have been proposed to address this. |
https://issues.apache.org/jira/browse/HDDS-5791