madrob commented on code in PR #864:
URL: https://github.com/apache/solr/pull/864#discussion_r874970917


##########
solr/core/src/java/org/apache/solr/cloud/api/collections/CreateAliasCmd.java:
##########
@@ -140,15 +145,21 @@ private void callCreateRoutedAlias(
                   Sets.difference(routedAlias.getRequiredParams(), 
props.keySet()), ','));
     }
 
-    // Create the first collection.
-    String initialColl = routedAlias.computeInitialCollectionName();
-    ensureAliasCollection(
-        aliasName, zkStateReader, state, routedAlias.getAliasMetadata(), 
initialColl);
+    Aliases aliases = zkStateReader.aliasesManager.getAliases();
+
+    List<String> collectionList = aliases.resolveAliases(aliasName);
+    String collectionListStr = String.join(",", collectionList);

Review Comment:
   Yea, I'm not so worried about the performance in reality, as much as the 
code reading of creating an extra variable for the only purpose of being 
"final" for the method lambda later. Let's just make it final in the first 
place and let the compiler figure it out.



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