psalagnac commented on code in PR #3834:
URL: https://github.com/apache/solr/pull/3834#discussion_r2500005318


##########
solr/core/src/java/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.java:
##########
@@ -464,13 +463,13 @@ private boolean iAmInChargeOfPeriodicDeletes() {
     String col = desc.getCollectionName();
 
     DocCollection docCollection = zk.getClusterState().getCollection(col);
-    if (docCollection.getActiveSlicesArr().length == 0) {
+    if (docCollection.getActiveSlices().isEmpty()) {
       log.error("Collection {} has no active Slices?", col);
       return false;
     }
-    List<Slice> slices = new 
ArrayList<>(Arrays.asList(docCollection.getActiveSlicesArr()));
+    List<Slice> slices = new ArrayList<>(docCollection.getActiveSlices());

Review Comment:
   Good point. Retrieving the first element (== min) can be done without 
sorting the full list. That's more efficient.



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