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

small preferLocalShards implementation refactor

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 5.4, 6.0
    • None
    • 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.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            cpoerschke Christine Poerschke
            cpoerschke Christine Poerschke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment