MarvinCai commented on pull request #2494:
URL: https://github.com/apache/bookkeeper/pull/2494#issuecomment-734168859


   @eolivelli hi, no worry
   I'm trying to add the readahead by using a map of [entryId -> content] as 
readahead entry cache of size X
   Entry will be read into the cache by the doReadAhead method which will read 
Y entry a time and keep reading till fill the cache or encounter error.
   The cached entry will have ttl and will be evicted when expired, a 
background task should also try to fill the cache at the same rate of entry 
expiration (instead of delete cached entry every time it's used to fulfill a 
read request cause I thought it's possible an entry might be read multiple 
times)
   When read request come in we'll first try to search by entryId in cache to 
fulfill the request, if it missed we'll try to read with ledgerHandler and do 
concatenation if necessary (in case some of read operation for cached entry 
failed) 
   I'll definitely have test case for it but just want to make sure this sounds 
like a valid approach


----------------------------------------------------------------
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