Solr
  1. Solr
  2. SOLR-3108

Error in SolrCloud's replica lookup code when replica's are hosted in same Solr instance

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: SolrCloud
    • Labels:
      None
    • Environment:

      Solr trunk as of today (r1241575)

      Description

      There's a small bug in ZkStateReader.getReplicaProps() when you have multiple replicas of the same shard/slice hosted in one CoreContainer. Not that you would often do this, but I was playing around with shards & replicas using just one Solr instance and noticed it. The attached patch should make it clear, the check on !coreNodeName.equals(filterNodeName) will always be false in such case.

      1. SOLR-3108.patch
        17 kB
        Mark Miller
      2. SOLR-3108.patch
        0.9 kB
        Bruno Dumon

        Activity

        Bruno Dumon created issue -
        Bruno Dumon made changes -
        Field Original Value New Value
        Attachment SOLR-3108.patch [ 12513673 ]
        Mark Miller made changes -
        Assignee Mark Miller [ markrmiller@gmail.com ]
        Hide
        Mark Miller added a comment -

        Thanks Bruno - I'll take a look at this tomorrow.

        Show
        Mark Miller added a comment - Thanks Bruno - I'll take a look at this tomorrow.
        Mark Miller made changes -
        Fix Version/s 4.0 [ 12314992 ]
        Hide
        Mark Miller added a comment -

        Bruno's fix + a test. To make the test I also did a little around the numShards handling so that you can pass it on core creation with the CoreAdminHandler. Sami, it would prob be good for you to review that a bit - I'm not sure if we can do that in a cleaner way or not?

        Show
        Mark Miller added a comment - Bruno's fix + a test. To make the test I also did a little around the numShards handling so that you can pass it on core creation with the CoreAdminHandler. Sami, it would prob be good for you to review that a bit - I'm not sure if we can do that in a cleaner way or not?
        Mark Miller made changes -
        Attachment SOLR-3108.patch [ 12513862 ]
        Hide
        Mark Miller added a comment -

        I've committed the fix only for the moment since its very simple and straightforward.

        I'll let Sami take a peek at my changes to support the new test before committing that.

        Show
        Mark Miller added a comment - I've committed the fix only for the moment since its very simple and straightforward. I'll let Sami take a peek at my changes to support the new test before committing that.
        Hide
        Sami Siren added a comment -

        Mark, your changes + test looks good to me. The way we can pass data to overseer (via CoreState) is a bit limited. I think we might want to move to different kind of mechanism later, for example a simple work queue hosted in zk. That would make things simpler both in overseer implementation and also the parts that need to pass information to overseer.

        Show
        Sami Siren added a comment - Mark, your changes + test looks good to me. The way we can pass data to overseer (via CoreState) is a bit limited. I think we might want to move to different kind of mechanism later, for example a simple work queue hosted in zk. That would make things simpler both in overseer implementation and also the parts that need to pass information to overseer.
        Hide
        Mark Miller added a comment -

        Thanks Sami and Bruno!

        Show
        Mark Miller added a comment - Thanks Sami and Bruno!
        Mark Miller made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Uwe Schindler made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mark Miller
            Reporter:
            Bruno Dumon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development