iprithv commented on code in PR #16212:
URL: https://github.com/apache/lucene/pull/16212#discussion_r3383116357
##########
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:
read lock still blocks all writers on that partition, so the contention
concern is the same. and the snapshot approach is actually more expensive. it
allocates a full copy of all keys, whereas the current approach only collects
the few entries that actually match. for something that runs once a minute,
this is a non-issue either way.
--
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]