sgup432 commented on code in PR #16212:
URL: https://github.com/apache/lucene/pull/16212#discussion_r3382785498
##########
lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java:
##########
@@ -1290,14 +1319,8 @@ public synchronized void cleanUp() {
keysToClean.removeAll(keysToCleanCopy);
queriesToClean.removeAll(queriesToCleanCopy);
- for (QueryCacheKey queryCacheKey : keys()) {
Review Comment:
No, I meant we need to take a read lock(this was probably implied), create a
snapshot of keys and return that. A read lock is still much cheaper to do
compared to what we are doing otherwise ie taking an unnecessary write lock on
the whole partition.
--
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]