[ https://issues.apache.org/jira/browse/SOLR-14639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17177826#comment-17177826 ]
Erick Erickson commented on SOLR-14639: --------------------------------------- I'll add my thanks, this is one of those thankless tasks... I did a quick grep and there are about 130 instances of "new ConcurrentHashMap..." in the code base. Changing them all at once is ...daunting... Is there a way to tell when a particular instance is causing the slowdown? Even if we implement the method, this means we'd potentially be playing whack-a-mole due to: "worse with your Zipf-distributed keys". We'd have to watch that asMap view, particularly any time we catch ConcurrentModificationExceptions: {code} The asMap view (and its collection views) have weakly consistent iterators. This means that they are safe for concurrent use, but if other threads modify the cache after the iterator is created, it is undefined which of these changes, if any, are reflected in that iterator. These iterators never throw ConcurrentModificationException. {code} I don't know whether we actually depend on this exception or not, it just looks tricky. > Improve concurrency of SlowCompositeReaderWrapper.terms > ------------------------------------------------------- > > Key: SOLR-14639 > URL: https://issues.apache.org/jira/browse/SOLR-14639 > Project: Solr > Issue Type: Improvement > Components: search > Affects Versions: 8.4.1 > Reporter: Shalin Shekhar Mangar > Priority: Major > Attachments: Screen Shot 2020-07-09 at 4.38.03 PM.png > > > Under heavy query load, the ConcurrentHashMap.computeIfAbsent method inside > the SlowCompositeReaderWrapper.terms(String) method blocks searcher threads > (see attached screenshot of a java flight recording). -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org