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

ZkStateReader.readConfigName is doing too much work

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.6
    • Component/s: None
    • Labels:
      None

      Description

      ZkStateReader.readConfigName reads the configSet name given a collection name parameter. Simple. It's doing too much work to do this though. First it's calling zkClient.exists() which is redundant given that we then call getData will will detect if it doesn't exist. Then we validate that the config path exists. But I don't think that should be verified on read, only on write. This method is a hotspot for nodes with lots of cores, proven out with profiling.

      Ideally the configSet name ought to be moved to state.json which is where all the other collection metadata is and is thus already read by most spots that want to read the configSet name. That would speed things up further and generally simplify things as well. That can happen on a follow-on issue, I think.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                dsmiley David Smiley
              • Votes:
                0 Vote for this issue
                Watchers:
                5 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