Copilot commented on code in PR #3965:
URL: https://github.com/apache/solr/pull/3965#discussion_r2630211890


##########
solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java:
##########
@@ -776,6 +789,11 @@ private Exception checkForExceptions(String message, 
Collection<Future<JettySolr
         log.error(message, e);
         parsed.addSuppressed(e.getCause());
         ok = false;
+      } catch (java.util.concurrent.CancellationException e) {
+        // Future was cancelled due to timeout - log but don't fail the 
shutdown
+        log.warn("Jetty shutdown task was cancelled (likely due to timeout)", 
e);

Review Comment:
   The logging level for CancellationException is inconsistent with 
ExecutionException handling. Both exceptions set ok=false and add suppressed 
exceptions, indicating they're both error conditions. Consider using log.error 
instead of log.warn for consistency, since both prevent successful shutdown and 
result in an exception being thrown.
   ```suggestion
           // Future was cancelled due to timeout - treat as shutdown failure
           log.error("Jetty shutdown task was cancelled (likely due to 
timeout)", e);
   ```



##########
solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java:
##########
@@ -776,6 +789,11 @@ private Exception checkForExceptions(String message, 
Collection<Future<JettySolr
         log.error(message, e);
         parsed.addSuppressed(e.getCause());
         ok = false;
+      } catch (java.util.concurrent.CancellationException e) {

Review Comment:
   Consider adding an import for CancellationException instead of using the 
fully qualified name. This is consistent with other exception types used in 
this file like ExecutionException and InterruptedException which are imported.



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