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


##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java:
##########
@@ -965,11 +964,12 @@ public void testRetryUpdatesWhenClusterStateIsStale() 
throws Exception {
                 
Collections.singletonList(cluster.getZkServer().getZkAddress()), 
Optional.empty())
             .withParallelUpdates(true)
             .sendDirectUpdatesToAnyShardReplica()
+            .withDefaultCollection(COL)
             // don't let collection cache entries get expired, even on a slow 
machine...
             .withCollectionCacheTtl(Integer.MAX_VALUE)
             .build()) {
-
-      stale_client.setDefaultCollection(COL);
+      // don't let collection cache entries get expired, even on a slow 
machine...
+      stale_client.setCollectionCacheTTl(Integer.MAX_VALUE);

Review Comment:
   should use builder?  it wasn't here before; what's the story?



##########
solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java:
##########
@@ -147,6 +147,8 @@ public void beforeTest() {
   protected volatile ChaosMonkey chaosMonkey;
 
   protected Map<String, CloudJettyRunner> shardToLeaderJetty = new 
ConcurrentHashMap<>();
+  protected volatile Map<String, CloudSolrClient> solrClientForCollectionCache 
=

Review Comment:
   why volatile?



##########
solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java:
##########
@@ -1990,13 +1990,22 @@ protected void destroyServers() throws Exception {
                       IOUtils.closeQuietly(c);
                     }));
 
+    customThreadPool.submit(
+        () ->
+            solrClientForCollectionCache.values().parallelStream()

Review Comment:
   parallelStream seems like overkill for a small collection of things that 
should close quickly.  Were you inspired by something?



##########
solr/modules/hdfs/src/test/org/apache/solr/hdfs/cloud/HdfsRecoveryZkTest.java:
##########
@@ -29,7 +28,6 @@
 import org.junit.BeforeClass;
 
 @Nightly
[email protected](bugUrl = "SOLR-15405")

Review Comment:
   very out of scope of this PR; remove



##########
solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java:
##########
@@ -1990,13 +1990,22 @@ protected void destroyServers() throws Exception {
                       IOUtils.closeQuietly(c);
                     }));
 
+    customThreadPool.submit(
+        () ->
+            solrClientForCollectionCache.values().parallelStream()
+                .forEach(
+                    c -> {
+                      IOUtils.closeQuietly(c);
+                    }));
+
     customThreadPool.submit(() -> IOUtils.closeQuietly(controlClientCloud));
 
     customThreadPool.submit(() -> IOUtils.closeQuietly(cloudClient));
 
     ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);
 
     coreClients.clear();
+    solrClientForCollectionCache.clear();

Review Comment:
   Seems to be a deficiency of "RacerD" inside 
https://github.com/facebook/infer which Lift uses.
   @sonatype-lift exclude issue



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