sgup432 opened a new pull request, #17056:
URL: https://github.com/apache/lucene/pull/17056

   ### Description
   
   As part of #16657, we changed partition routing to use the query alone, so 
all entries for a query land in the same partition. The reason we had 
deprecated the older callbacks no longer applies, so this PR brings them back 
by removing the @Deprecated markers. It also removes the two newly added (and 
unreleased) callbacks, since they're no longer needed.
   
   #### Restored (deprecation removed):
   - onQueryCache(Query, long): fires once per distinct query, when its first 
entry is cached
   - onQueryEviction(Query, long): fires once per distinct query, when its last 
entry is evicted
   - onDocIdSetCache(Object, long): fires once per (segment, query) entry
   - onDocIdSetEviction(Object, int, long): fires once per (segment, query) 
entry
   
   #### Removed:
   - onCacheEntryInserted(Object, Query, long)
   - onCacheEntryEvicted(Object, Query, long)
   
   Note that the new query cache, including #16657, hasn't been released yet 
and ships in 11.0. So restoring the deprecated methods and removing these two 
callbacks doesn't break anyone.
   
   
   This PR also validates numberOfPartitions: it must be a power of two and no 
greater than maxSize. It also adds tests that check the restored callbacks fire 
once per distinct query.
   
   
   
   <!--
   If this is your first contribution to Lucene, please make sure you have 
reviewed the contribution guide.
   https://github.com/apache/lucene/blob/main/CONTRIBUTING.md
   -->
   


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