patsonluk commented on code in PR #909: URL: https://github.com/apache/solr/pull/909#discussion_r911537402
########## solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java: ########## @@ -246,6 +244,90 @@ public boolean canBeRemoved() { } } + /** + * A ConcurrentHashMap of active watcher by collection name + * + * <p>Each watcher DocCollectionWatch also contains the latest DocCollection (state) observed + */ + private static class DocCollectionWatches + extends ConcurrentHashMap<String, DocCollectionWatch<DocCollectionWatcher>> { Review Comment: Would you mind to explain some common issues with extending ConcurrentHashMap? 😊 I am totally open to moving that to another case that encapsulates it as a field, but I do want to learn a bit more! (and for that new class we probably need to have some extra synchronization?) I guess I chose this current solution as it was a concurrent hash map before, so extending it can allow all existing invocations to stay as is. -- 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...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org