aparnasuresh85 commented on code in PR #2571:
URL: https://github.com/apache/solr/pull/2571#discussion_r1695995454
##########
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:
Yes, updated. There was an additional call to `LISTALIASES` from
`directUpdate()` for the `isRoutedAlias()` check. The updated PR includes a
change to make that check only applicable for multi-collection aliases.
--
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]