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)
- 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).
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.