[ 
https://issues.apache.org/jira/browse/SOLR-12388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16487071#comment-16487071
 ] 

Steve Rowe commented on SOLR-12388:
-----------------------------------

Attached patch implements the idea.

Rather than introducing a new request param, I've expanded the possible values 
{{shards.tolerant}} can take on to include non-boolean value 
{{requireZkConnected}}, which enables the mode described above.  (Thanks to 
[~hossman] for his offline suggestion to use {{shards.tolerant}} for this 
purpose.) 

In addition to causing requests to fail when the coordinating node can't 
communicate with ZooKeeper, setting {{shards.tolerant}} to 
{{requireZkConnected}} will cause search components to behave the same as when 
{{shards.tolerant}} is set to {{false}} (the default): the request will fail 
rather than causing partial results to be returned.

I've included ref guide docs and a CHANGES entry. Precommit and all Solr tests 
pass. I think this is ready to go.

Feedback is welcome.

> Enable a strict ZooKeeper-connected search request mode, in which search 
> requests will fail when the coordinating node can't communicate with ZooKeeper
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-12388
>                 URL: https://issues.apache.org/jira/browse/SOLR-12388
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>            Priority: Minor
>         Attachments: SOLR-12388.patch
>
>
> Right now, a Solr node will return the results of a search request even if it 
> cannot communicate with ZooKeeper at the time it receives the request. This 
> may result in stale or incorrect results if there have been major changes to 
> the collection structure that the node has not been informed of via 
> ZooKeeper.  When this happens, as long as all known shards respond, the 
> response will succeed, and a {{zkConnected}} header set to {{false}} is 
> included in the search response.
> There should be an option to instead fail requests under these conditions, to 
> prevent stale or incorrect results.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to