mlbiscoc commented on code in PR #4237:
URL: https://github.com/apache/solr/pull/4237#discussion_r3012111232
##########
solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentOptimizationTest.java:
##########
@@ -707,6 +711,55 @@ private QueryResponse queryWithAsserts(String... q) throws
Exception {
return response;
}
+ /**
+ * When a node resolves collection state for a collection it doesn't host,
queries should use
+ * cached state and not make ZK calls on every query.
+ */
+ @Test
+ public void testDistributedQueryDoesNotReadFromZk() throws Exception {
Review Comment:
@dsmiley I agreed with your comment before and wrote a test. Did some TDD so
this definitely failed before the fix. Also learned a bit more. This actually
only triggers with multi-collection query or I guess if you have an alias
pointing to multiple collections. So this test reflects that creating a
collection on a separate node then querying for both. If your node is hosting
all collections it doesn't do a lazyCollectionRef get call. Maybe worth adding
that to the changelog?
--
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]