jpountz commented on code in PR #14412: URL: https://github.com/apache/lucene/pull/14412#discussion_r2018865956
########## lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java: ########## @@ -122,12 +123,30 @@ public LRUQueryCache( long maxRamBytesUsed, Predicate<LeafReaderContext> leavesToCache, float skipCacheFactor) { + this(maxSize, maxRamBytesUsed, leavesToCache, new AtomicReference<>(skipCacheFactor)); + } + + /** + * Additionally, allows the ability to pass skipCacheFactor in form of AtomicReference where the + * caller can dynamically update(in a thread safe way) its value by calling skipCacheFactor.set() + * on their end. + */ + public LRUQueryCache( + int maxSize, + long maxRamBytesUsed, + Predicate<LeafReaderContext> leavesToCache, + AtomicReference<Float> skipCacheFactor) { Review Comment: I don't think that this is a reason for exposing it via an AtomicReference instead of a getter/setter. TieredMergePolicy, to give an example, is the same: many of its setters are not exposed on MergePolicy. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org