Solr
  1. Solr
  2. SOLR-8298

small preferLocalShards implementation refactor

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      Towards rebasing the SOLR-6730 patch after SOLR-6832 and other changes - proposed patch against trunk to follow.

      existing calling chain:

      • ResponseBuilder.addRequest(... ShardRequest sreq) does sreq.rb = this; so that later on HttpShardHandler.submit(ShardRequest sreq ...) can do sreq.rb.req.getOriginalParams().getBool for CommonParams.PREFER_LOCAL_SHARDS

      proposed alternative calling chain:

      • HttpShardHandler.prepDistributed(ResponseBuilder rb) sets rb.preferredHostAddress and SearchHandler calls ShardHandler.submit(ShardRequest sreq ... rb.preferredHostAddress)

      structural changes:

      • ShardRequest.rb member removed in favour of a new ResponseBuilder.preferredHostAddress member.
      • String preferredHostAddress argument added to the abstract ShardHandler.submit method (and to two derived (test) classes' submit methods also).
      • public void submit(ShardRequest sreq, String shard, ModifiableSolrParams params) { submit(sreq, shard, params, null); } 

        added to avoid having to change ShardHandler.submit callers which don't have a concept of preferring a local shard e.g. for PeerSync requests.

      1. SOLR-8298.patch
        9 kB
        Christine Poerschke

        Issue Links

          Activity

          Hide
          Christine Poerschke added a comment -

          Attaching proposed patch against trunk.

          Sachin Goyal and Timothy Potter if you would have a chance to take a look perhaps at some point that would be much appreciated. There should be no actual change here compared to the SOLR-6832 logic i.e. this is only a small implementation refactor. Thank you.

          Show
          Christine Poerschke added a comment - Attaching proposed patch against trunk. Sachin Goyal and Timothy Potter if you would have a chance to take a look perhaps at some point that would be much appreciated. There should be no actual change here compared to the SOLR-6832 logic i.e. this is only a small implementation refactor. Thank you.
          Hide
          Timothy Potter added a comment -

          Christine Poerschke changes look good to me, thanks for cleaning this up a bit

          Show
          Timothy Potter added a comment - Christine Poerschke changes look good to me, thanks for cleaning this up a bit
          Hide
          ASF subversion and git services added a comment -

          Commit 1715208 from Christine Poerschke in branch 'dev/trunk'
          [ https://svn.apache.org/r1715208 ]

          SOLR-8298: small preferLocalShards implementation refactor

          Show
          ASF subversion and git services added a comment - Commit 1715208 from Christine Poerschke in branch 'dev/trunk' [ https://svn.apache.org/r1715208 ] SOLR-8298 : small preferLocalShards implementation refactor
          Hide
          ASF subversion and git services added a comment -

          Commit 1715231 from Christine Poerschke in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1715231 ]

          SOLR-8298: small preferLocalShards implementation refactor (merge in revision 1715208 from trunk)

          Show
          ASF subversion and git services added a comment - Commit 1715231 from Christine Poerschke in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1715231 ] SOLR-8298 : small preferLocalShards implementation refactor (merge in revision 1715208 from trunk)

            People

            • Assignee:
              Christine Poerschke
              Reporter:
              Christine Poerschke
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development