hanishakoneru commented on pull request #170:
URL: https://github.com/apache/incubator-ratis/pull/170#issuecomment-671459251


   @lokeshj1703, if I understand correctly, this fix will purge the logs 
instead of evicting them from cache.
   
   This might lead to more frequent install snapshots requests if a follower is 
lagging behind a few log segments. Currently in Ozone, the maximum number of 
cached segments is set to 2 in both Datanodes and Ozone. 
   
   1. Instead of purging logs when they need to be evicted from cache, can the 
purge implementation be fixed to also consider the logs  on disk and not in 
cache. With this approach, we would have  to take care of tracking on disk logs 
for other cases as well (for example {{RaftLog#getStartIndex}}).
   2. Another option would be to align the cache eviction logic with the log 
purge logic but this might not be optimal if the purge limit is set very high. 
   
   I think the first approach would be the clean solution. What are your 
thoughts?
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to