You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "patsonluk (via GitHub)" <gi...@apache.org> on 2023/03/13 23:20:16 UTC

[GitHub] [solr] patsonluk commented on a diff in pull request #1438: SOLR-16690: enqueueUpdate should execute callback even if cmds is empty or noop

patsonluk commented on code in PR #1438:
URL: https://github.com/apache/solr/pull/1438#discussion_r1134711592


##########
solr/core/src/java/org/apache/solr/cloud/overseer/ZkStateWriter.java:
##########
@@ -139,8 +139,12 @@ public ClusterState enqueueUpdate(
       throw new IllegalStateException(
           "ZkStateWriter has seen a tragic error, this instance can no longer be used");
     }
-    if (cmds.isEmpty()) return prevState;
-    if (isNoOps(cmds)) return prevState;
+    if (cmds.isEmpty() || isNoOps(cmds)) { // empty and no-ops are valid, should call callback
+      if (callback != null) {

Review Comment:
   Added `ZkStateWriterTest#testEnqueueCallback`



-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org