Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16690

ZkStateWriter#enqueueUpdate should execute callback even tho cmds is empty or no-op

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 9.1.1
    • None
    • SolrCloud
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              patson Patson Luk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m