Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
The list of replicas to which requests are sent are identified in a static fashion. There is no way to cleanly plugin alternate logic of identifying the replica list .
two major interfaces abstracted out are
public interface HeaderInterceptor { /**Names of headers to be read from the response */ List<String> responseHeaders(); /**The callback received after a response. This must be called with a 'null' if there was no such header * */ void responseHeaderVal(String key, String val); /**The headers that must be added to the request. * @return return null or an empty map if nothing needs to added */ Map<String, String > requestHeaders(); }
/**This interface gives urls one by one instead of giving a full list. * This also lets the implementation provide extra details as HTTP headers * */ public interface UrlProvider extends HeaderInterceptor { /**Give the base url for the next request to be fired. This is invoked the first time * a request needs to be fired, or subsequent after {@link UrlProvider#toRetry()} returns true * @return null if no more nodes/cores are available */ String nextBaseurl(); /**Verify header value. This callback WILL be given if responseHeaderName is supplied, even if it is null * @return true if the request should be retried * Return the error message if there is something wrong with the response */ boolean toRetry() throws SolrException; }
Attachments
Issue Links
- is depended upon by
-
SOLR-13951 Avoid replica state updates to state.json
- Resolved