dsmiley commented on code in PR #2571:
URL: https://github.com/apache/solr/pull/2571#discussion_r1695801350


##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java:
##########
@@ -262,26 +265,34 @@ public void testAliasHandling() throws Exception {
   public void testHttpCspPerf() throws Exception {
 
     String collectionName = "HTTPCSPTEST";
-    CollectionAdminRequest.createCollection(collectionName, "conf", 2, 
1).process(cluster.getSolrClient());
+    CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1)
+        .process(cluster.getSolrClient());
     cluster.waitForActiveCollection(collectionName, 2, 2);
 
-    CloudSolrClient solrClient = null;
-    try (LogListener entireClusterStateLogs = 
LogListener.info(HttpSolrCall.class).regex(PATTERN_WITHOUT_COLLECTION); 
LogListener collectionClusterStateLogs = 
LogListener.info(HttpSolrCall.class).regex(PATTERN_WITH_COLLECTION); 
LogListener adminRequestLogs = 
LogListener.info(HttpSolrCall.class).substring("[admin]")) {
-
-      solrClient = createHttpCSPBasedCloudSolrClient();
-
+    try (LogListener entireClusterStateLogs =
+            
LogListener.info(HttpSolrCall.class).regex(PATTERN_WITHOUT_COLLECTION);
+        LogListener collectionClusterStateLogs =
+            
LogListener.info(HttpSolrCall.class).regex(PATTERN_WITH_COLLECTION);
+        LogListener adminRequestLogs = 
LogListener.info(HttpSolrCall.class).substring("[admin]");
+        CloudSolrClient solrClient = createHttpCSPBasedCloudSolrClient(); ) {
       SolrInputDocument doc = new SolrInputDocument("id", "1", "title_s", "my 
doc");
       solrClient.add(collectionName, doc);
       solrClient.commit(collectionName);
       for (int i = 0; i < 3; i++) {
-        assertEquals(1, solrClient.query(collectionName, params("q", 
"*:*")).getResults().getNumFound());
+        assertEquals(
+            1, solrClient.query(collectionName, params("q", 
"*:*")).getResults().getNumFound());
       }
 
-      assertLogCount(adminRequestLogs, 12);
-      assertLogCount(collectionClusterStateLogs, 10);
+      // 1 call to fetch entire cluster state via BaseHttpCSP.fetchLiveNodes()
+      // 1 call to LISTALIASES via getAliases() from CSC.sendRequest() -> 
(CSC.directUpdate ->

Review Comment:
   Shouldn't directUpdate use resolveAliases() just like 
requestWithRetryOnStaleState does?



-- 
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]

Reply via email to