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

base replica selection strategy not applied to "last place" shards.preference matches

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 8.3, 9.0
    • 8.5.2, 8.6, 9.0
    • SolrCloud
    • None

    Description

      When shards.preferences is specified, all inherently equivalent groups of replicas should fall back to being sorted by the replica.base strategy (either random or some variant of "stable"). This currently works for every group of "equivalent" replicas, with the exception of "last place" matches.

      This is easy to overlook, because usually it's the "first place" matches that will be selected for the purpose of actually executing distributed requests; but it's still a bug, and is especially problematic when "last place matches" == "first place matches" – e.g. when shards.preference specified matches all available replicas.

      Attachments

        Issue Links

          Activity

            Closing after the 8.5.2 release

            tflobbe Tomas Eduardo Fernandez Lobbe added a comment - Closing after the 8.5.2 release

            Commit 384dadd9141cec3f848d8c416315dc2384749814 in lucene-solr's branch refs/heads/branch_8_5 from Tomas Eduardo Fernandez Lobbe
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=384dadd ]

            SOLR-14471: CHANGES entry for 8.5.2

            jira-bot ASF subversion and git services added a comment - Commit 384dadd9141cec3f848d8c416315dc2384749814 in lucene-solr's branch refs/heads/branch_8_5 from Tomas Eduardo Fernandez Lobbe [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=384dadd ] SOLR-14471 : CHANGES entry for 8.5.2

            Commit 6677d5f1fd0ee63dc7f681e770923e74081f176c in lucene-solr's branch refs/heads/branch_8_5 from Michael Gibney
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=6677d5f ]

            SOLR-14471: Fix last-place replica after shards.preference rules (#1507)

            Properly apply base replica ordering to last-place shards.preference matches

            jira-bot ASF subversion and git services added a comment - Commit 6677d5f1fd0ee63dc7f681e770923e74081f176c in lucene-solr's branch refs/heads/branch_8_5 from Michael Gibney [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=6677d5f ] SOLR-14471 : Fix last-place replica after shards.preference rules (#1507) Properly apply base replica ordering to last-place shards.preference matches

            We can backport this to 8.5.2

            tflobbe Tomas Eduardo Fernandez Lobbe added a comment - We can backport this to 8.5.2
            magibney Michael Gibney added a comment -

            Great! Thanks, Tomas!

            magibney Michael Gibney added a comment - Great! Thanks, Tomas!

            Merged. Thanks Michael!

            tflobbe Tomas Eduardo Fernandez Lobbe added a comment - Merged. Thanks Michael!

            Commit abaf16ea1bb2301e5b555f0bf1ea9d3bd7012761 in lucene-solr's branch refs/heads/branch_8x from Tomas Eduardo Fernandez Lobbe
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=abaf16e ]

            SOLR-14471: Add CHANGES entry

            jira-bot ASF subversion and git services added a comment - Commit abaf16ea1bb2301e5b555f0bf1ea9d3bd7012761 in lucene-solr's branch refs/heads/branch_8x from Tomas Eduardo Fernandez Lobbe [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=abaf16e ] SOLR-14471 : Add CHANGES entry

            Commit 43631e126e93308d034a2babd51765230f96f5e3 in lucene-solr's branch refs/heads/branch_8x from Michael Gibney
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=43631e1 ]

            SOLR-14471: Fix last-place replica after shards.preference rules (#1507)

            Properly apply base replica ordering to last-place shards.preference matches

            jira-bot ASF subversion and git services added a comment - Commit 43631e126e93308d034a2babd51765230f96f5e3 in lucene-solr's branch refs/heads/branch_8x from Michael Gibney [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=43631e1 ] SOLR-14471 : Fix last-place replica after shards.preference rules (#1507) Properly apply base replica ordering to last-place shards.preference matches

            Commit 4e564079fb2a160624bb30bec5caf9992d6717bb in lucene-solr's branch refs/heads/master from Tomas Eduardo Fernandez Lobbe
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=4e56407 ]

            SOLR-14471: Add CHANGES entry

            jira-bot ASF subversion and git services added a comment - Commit 4e564079fb2a160624bb30bec5caf9992d6717bb in lucene-solr's branch refs/heads/master from Tomas Eduardo Fernandez Lobbe [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=4e56407 ] SOLR-14471 : Add CHANGES entry

            Commit 54dca800a9432a72b93723d40fa4abc9a8e11f14 in lucene-solr's branch refs/heads/master from Michael Gibney
            [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=54dca80 ]

            SOLR-14471: Fix last-place replica after shards.preference rules (#1507)

            Properly apply base replica ordering to last-place shards.preference matches

            jira-bot ASF subversion and git services added a comment - Commit 54dca800a9432a72b93723d40fa4abc9a8e11f14 in lucene-solr's branch refs/heads/master from Michael Gibney [ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=54dca80 ] SOLR-14471 : Fix last-place replica after shards.preference rules (#1507) Properly apply base replica ordering to last-place shards.preference matches
            magibney Michael Gibney added a comment -

            Thanks for the feedback, tflobbe. Is this something you'd be willing to commit, and/or would it make sense to loop anyone else in on this? Please let me know if there's anything else I can do to help.

            magibney Michael Gibney added a comment - Thanks for the feedback, tflobbe . Is this something you'd be willing to commit, and/or would it make sense to loop anyone else in on this? Please let me know if there's anything else I can do to help.

            Thanks Michael. PR looks good to me.

            tflobbe Tomas Eduardo Fernandez Lobbe added a comment - Thanks Michael. PR looks good to me.
            magibney Michael Gibney added a comment -

            A couple of reports of this bug in the wild have recently surfaced on the solr-user list; basically, for some replica configurations and shards.preference settings, routing (e.g., load balancing) of internal requests is not working properly. tflobbe, would you be able to take a look, when you have a chance?

            magibney Michael Gibney added a comment - A couple of reports of this bug in the wild have recently surfaced on the solr-user list; basically, for some replica configurations and shards.preference settings, routing (e.g., load balancing) of internal requests is not working properly. tflobbe , would you be able to take a look, when you have a chance?
            magibney Michael Gibney added a comment - - edited

            Fix (and test illustrating the problem) at PR #1507

            magibney Michael Gibney added a comment - - edited Fix (and test illustrating the problem) at PR #1507

            People

              tflobbe Tomas Eduardo Fernandez Lobbe
              magibney Michael Gibney
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 0.5h
                  0.5h