You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Patson Luk (Jira)" <ji...@apache.org> on 2023/03/08 02:03:00 UTC

[jira] [Created] (SOLR-16690) ZkStateWriter#enqueueUpdate should execute callback even tho cmds is empty or no-op

Patson Luk created SOLR-16690:
---------------------------------

             Summary: ZkStateWriter#enqueueUpdate should execute callback even tho cmds is empty or no-op
                 Key: SOLR-16690
                 URL: https://issues.apache.org/jira/browse/SOLR-16690
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrCloud
    Affects Versions: 9.1.1
            Reporter: Patson Luk


{{ZkStateWriter#enqueueUpdate(ClusterState prevState, List<ZkWriteCommand> cmds, ZkWriteCallback callback)}} accepts a callback but such callback would not be called if either the cmds is empty or a no-op.

However, this could cause issues in some scenarios, for example in {{Overseer$ClusterStateUpdater#run}}, it calls 


clusterState =  processQueueItem(message, clusterState, zkStateWriter,  true,
                        () -> {
                          stateUpdateQueue.remove(processedNodes);
                          processedNodes.clear();
                        });

Which it relies on the callback to remove items from the work queue, however if the message does not create an empty {{List<ZkWriteCommand>}} - for example "DOWNNODE" for PRS enabled collection, then  the callback will be ignored hence the `stateUpdateQueue.remove(processedNodes);` would not be run even though it has finished processing the message




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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