Solr
  1. Solr
  2. SOLR-6933

bin/solr script should just have a single create action that creates a core or collection depending on the mode solr is running in

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: scripts and tools
    • Labels:
      None

      Description

      instead of create_core and create_collection, just have create that creates a core or a collection based on which mode Solr is running in.

        Issue Links

          Activity

          Hide
          Hoss Man added a comment -

          instead of create_core and create_collection...

          i would strongly suggest leving both of those commands alone, and instead adding a new "create" that delegates to them as needed.

          Show
          Hoss Man added a comment - instead of create_core and create_collection... i would strongly suggest leving both of those commands alone, and instead adding a new "create" that delegates to them as needed.
          Hide
          Timothy Potter added a comment -

          leving both of those commands alone

          +1

          So a couple of basic questions shake out of this. First, what does the usage (bin/solr create -help) say? Options like -shards, -maxShardsPerNode, -replicationFactor don't apply when creating a core. I think the help should be explicit about cores vs. collections. Second, if the user tries to pass one of the collection specific options (say -shards 10) when Solr is running on cloud mode, I think the script should error out and tell the user that option is only when running in cloud mode. So if you're with me so far, then take a step back, now the 2-modes of Solr are still very much in the forefront of the experience around bin/solr create, which isn't all that different from what we have now with create_core and create_collection, except for the most basic usage of that action, ie.

          bin/solr create -n foo
          

          So if we think there's real benefit to having a "create" alias that's smart about the mode Solr is in, then I'll add it. But I still think the cores vs. collections problem doesn't go away with this create action.

          Show
          Timothy Potter added a comment - leving both of those commands alone +1 So a couple of basic questions shake out of this. First, what does the usage (bin/solr create -help) say? Options like -shards, -maxShardsPerNode, -replicationFactor don't apply when creating a core. I think the help should be explicit about cores vs. collections. Second, if the user tries to pass one of the collection specific options (say -shards 10) when Solr is running on cloud mode, I think the script should error out and tell the user that option is only when running in cloud mode. So if you're with me so far, then take a step back, now the 2-modes of Solr are still very much in the forefront of the experience around bin/solr create, which isn't all that different from what we have now with create_core and create_collection, except for the most basic usage of that action, ie. bin/solr create -n foo So if we think there's real benefit to having a "create" alias that's smart about the mode Solr is in, then I'll add it. But I still think the cores vs. collections problem doesn't go away with this create action.
          Hide
          Grant Ingersoll added a comment -

          and instead adding a new "create" that delegates to them as needed.

          +1

          First, what does the usage (bin/solr create -help) say? Options like -shards, -maxShardsPerNode, -replicationFactor don't apply when creating a core.

          If we are just delegating, than can we delegate to the underlying help too?

          I think the script should error out and tell the user that option is only when running in cloud mode.

          +1

          So if we think there's real benefit to having a "create" alias

          +1

          Show
          Grant Ingersoll added a comment - and instead adding a new "create" that delegates to them as needed. +1 First, what does the usage (bin/solr create -help) say? Options like -shards, -maxShardsPerNode, -replicationFactor don't apply when creating a core. If we are just delegating, than can we delegate to the underlying help too? I think the script should error out and tell the user that option is only when running in cloud mode. +1 So if we think there's real benefit to having a "create" alias +1
          Hide
          ASF subversion and git services added a comment -

          Commit 1651231 from Timothy Potter in branch 'dev/trunk'
          [ https://svn.apache.org/r1651231 ]

          SOLR-6952: bin/solr create action should copy configset directory instead of reusing an existing configset in ZooKeeper by default; commit also includes fix for SOLR-6933 - create alias

          Show
          ASF subversion and git services added a comment - Commit 1651231 from Timothy Potter in branch 'dev/trunk' [ https://svn.apache.org/r1651231 ] SOLR-6952 : bin/solr create action should copy configset directory instead of reusing an existing configset in ZooKeeper by default; commit also includes fix for SOLR-6933 - create alias
          Hide
          ASF subversion and git services added a comment -

          Commit 1651233 from Timothy Potter in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1651233 ]

          SOLR-6952: bin/solr create action should copy configset directory instead of reusing an existing configset in ZooKeeper by default; commit also includes fix for SOLR-6933 - create alias

          Show
          ASF subversion and git services added a comment - Commit 1651233 from Timothy Potter in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1651233 ] SOLR-6952 : bin/solr create action should copy configset directory instead of reusing an existing configset in ZooKeeper by default; commit also includes fix for SOLR-6933 - create alias
          Hide
          Timothy Potter added a comment -

          Resolved by fix committed for SOLR-6952

          Show
          Timothy Potter added a comment - Resolved by fix committed for SOLR-6952

            People

            • Assignee:
              Timothy Potter
              Reporter:
              Timothy Potter
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development