HoustonPutman commented on code in PR #4046:
URL: https://github.com/apache/solr/pull/4046#discussion_r2691209900


##########
solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java:
##########
@@ -359,14 +357,17 @@ public static SolrResponse submitCollectionApiCommand(
     Optional<DistributedCollectionConfigSetCommandRunner> distribCommandRunner 
=
         zkController.getDistributedCommandRunner();
     if (distribCommandRunner.isPresent()) {
-      return distribCommandRunner.get().runCollectionCommand(m, action, 
timeout);
+      return distribCommandRunner.get().runCollectionCommand(adminCmdContext, 
m, timeout);
     } else { // Sending the Collection API message to Overseer via a Zookeeper 
queue
-      String operation = m.getStr(QUEUE_OPERATION);
-      if (operation == null) {
-        throw new SolrException(ErrorCode.BAD_REQUEST, "missing key " + 
QUEUE_OPERATION);
+      String operation = adminCmdContext.getAction().lowerName;
+      HashMap<String, Object> additionalProps = new HashMap<>();
+      additionalProps.put(QUEUE_OPERATION, operation);
+      if (adminCmdContext.getAsyncId() != null && 
!adminCmdContext.getAsyncId().isBlank()) {

Review Comment:
   This is the front door before sending it off to be handled by the overseer, 
so I think it's a good place to do the check. Otherwise we will be checking 
more often.



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