Solr
  1. Solr
  2. SOLR-7132

The Collections API ADDREPLICA command property.name is not reflected in the clusterstate until after Solr restarts

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1, 6.0
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      If you do an ADDREPLICA command with &property.name=nonsense then go look at clusterstate.json, you'll see the default name for the replica. But if you then restart Solr, you see the name you specified on the create command, which is a bit confusing.

      1. SOLR-7132.patch
        7 kB
        Erick Erickson

        Activity

        Hide
        Erick Erickson added a comment -

        Varun Thacker I put this JIRA on my list some time ago. We deprecated the "name" parameter in SOLR-7499. However, there's still a "back door" here since one can specify "property.name" in an ADDREPLICA command. Do you think is "the right thing" here would be to also dis-allow specifying "property.name" too?

        Show
        Erick Erickson added a comment - Varun Thacker I put this JIRA on my list some time ago. We deprecated the "name" parameter in SOLR-7499 . However, there's still a "back door" here since one can specify "property.name" in an ADDREPLICA command. Do you think is "the right thing" here would be to also dis-allow specifying "property.name" too?
        Hide
        Varun Thacker added a comment - - edited

        Hi Erick,

        Yes we could also disallow "property.name" but this is my thinking currently. We have deprecated the name method for Solr 5.3 in SOLR-7499. We can remove it in Solr 5.4 . We don't make any changes to disallow "property.name" so that expert users who really have a use case of specifying the core name can use this method?

        We can still fix the bug that it only changes the name on a restart and not while creation. What do you think?

        Show
        Varun Thacker added a comment - - edited Hi Erick, Yes we could also disallow "property.name" but this is my thinking currently. We have deprecated the name method for Solr 5.3 in SOLR-7499 . We can remove it in Solr 5.4 . We don't make any changes to disallow "property.name" so that expert users who really have a use case of specifying the core name can use this method? We can still fix the bug that it only changes the name on a restart and not while creation. What do you think?
        Hide
        Erick Erickson added a comment -

        Makes sense, I may actually get to this this week sometime.

        I do like making this obscure via requiring property.name to be specified. Making the option obvious does more harm than good IMO since it encourages people to shoot themselves in the foot. But deprecating it as you have done and allowing this "back door" keeps casual/new users from doing something bad because they see the "name" option but still allows someone who really cares to control naming. Not that I'd advise they do so, but you know someone will want to

        Show
        Erick Erickson added a comment - Makes sense, I may actually get to this this week sometime. I do like making this obscure via requiring property.name to be specified. Making the option obvious does more harm than good IMO since it encourages people to shoot themselves in the foot. But deprecating it as you have done and allowing this "back door" keeps casual/new users from doing something bad because they see the "name" option but still allows someone who really cares to control naming. Not that I'd advise they do so, but you know someone will want to
        Hide
        Erick Erickson added a comment -

        Final patch.

        Show
        Erick Erickson added a comment - Final patch.
        Hide
        ASF subversion and git services added a comment -

        Commit 1690190 from Erick Erickson in branch 'dev/trunk'
        [ https://svn.apache.org/r1690190 ]

        SOLR-7132: The Collections API ADDREPLICA command property.name is not reflected in the clusterstate until after Solr restarts

        Show
        ASF subversion and git services added a comment - Commit 1690190 from Erick Erickson in branch 'dev/trunk' [ https://svn.apache.org/r1690190 ] SOLR-7132 : The Collections API ADDREPLICA command property.name is not reflected in the clusterstate until after Solr restarts
        Hide
        ASF subversion and git services added a comment -

        Commit 1690198 from Erick Erickson in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1690198 ]

        SOLR-7132: The Collections API ADDREPLICA command property.name is not reflected in the clusterstate until after Solr restarts

        Show
        ASF subversion and git services added a comment - Commit 1690198 from Erick Erickson in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1690198 ] SOLR-7132 : The Collections API ADDREPLICA command property.name is not reflected in the clusterstate until after Solr restarts

          People

          • Assignee:
            Erick Erickson
            Reporter:
            Erick Erickson
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development