sgup432 commented on PR #15558:
URL: https://github.com/apache/lucene/pull/15558#issuecomment-3752469966

   Turns out that testDocValuesUpdatesDontBreakCache was failing due to cache 
keys getting evicted and causing cache misses.
   
   Earlier, we initialized the cache with max size as 1. Not that earlier this 
denoted that the cache can hold at max 1 "query". Though overall cache can have 
multiple keys for the same query for different segments. Because of older 
structure <Segment, Map<Query, Value>>
   
   Post this change, that contract is broken ie maxSize denotes the total keys 
a cache can hold. As we changed the structure to <<Query, Segment>, Value> for 
performance reasons.
   The above test failed because by default we created 16 partitions, with each 
having 1 as maxSize. So at a certain point we expected that both segments value 
should be cached which it did not because a specific partition can hold 1 key 
at max, so there was a miss causing the test to fail. 
   
   Increased cache size to fix the failed test. Will also update documents to 
denote that maxSize number no-more represents the max query a cache can hold.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to