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


##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java:
##########
@@ -246,6 +267,36 @@ public void testAliasHandling() throws Exception {
         2, client.query(null, 
paramsWithMixedCollectionAndAlias).getResults().getNumFound());
   }
 
+  @Test
+  @LogLevel("org.apache.solr.servlet.HttpSolrCall=INFO")
+  public void testHttpCspPerf() throws Exception {
+
+    String COLLECTION = "TEST_COLLECTION";
+    CollectionAdminRequest.createCollection(COLLECTION, "conf", 2, 1)
+        .process(cluster.getSolrClient());
+    cluster.waitForActiveCollection(COLLECTION, 2, 2);
+
+    SolrInputDocument doc = new SolrInputDocument("id", "1", "title_s", "my 
doc");
+    httpBasedCloudSolrClient.add(COLLECTION, doc);
+    httpBasedCloudSolrClient.commit(COLLECTION);
+
+    for (int i = 0; i < 3; i++) {
+      assertEquals(
+          1,
+          httpBasedCloudSolrClient
+              .query(COLLECTION, params("q", "*:*"))
+              .getResults()
+              .getNumFound());
+    }
+
+    // still left with a call to fetch entire cluster state - to be addressed 
in a separate PR
+    assertTrue(entireClusterStateLogs.getQueue().size() == 1);
+
+    // Originates from CSP.resolveAliases() - 2 calls per request: 1 add, 1 
commit, and 3 queries.
+    // This issue is not being addressed in this PR.

Review Comment:
   Don't refer to "this PR" (or commit or similar) in code.  If it were to be 
merged, it'd be a weird thing to stumble upon, reading code.  Instead, if we 
aren't addressing a known problem, reference a JIRA and/or say "TODO ..."



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

Reply via email to