You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ishan Chattopadhyaya (JIRA)" <ji...@apache.org> on 2014/12/04 14:55:13 UTC
[jira] [Comment Edited] (SOLR-5890) Delete silently fails if not
sent to shard where document was added
[ https://issues.apache.org/jira/browse/SOLR-5890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14234208#comment-14234208 ]
Ishan Chattopadhyaya edited comment on SOLR-5890 at 12/4/14 1:54 PM:
---------------------------------------------------------------------
For supporting _route_ parameter per id in a deleteById request, instead of a _route_ parameter per request, I propose the following changes to the request format.
JSON:
"delete": { "id":"ID" , "_route_":"route"}
XML:
<delete>
<id "_route_"="shard1">123</id>
<id "_route_"="shard2">124</id>
</delete>
Similarly, together with
UpdateRequest.deleteById(List<String> ids),
I propose another method:
UpdateRequest.deleteById(List<String> ids, List<String> routes),
Here, I don't like the idea of list of encapsulated objects that contains both id and route, hence want to go with two lists. Any suggestions?
Also, like
UpdateRequest.deleteById(String id),
I propose another method:
UpdateRequest.deleteById(String id, String route)
Can someone please review these suggestions?
was (Author: ichattopadhyaya):
For supporting _route_ parameter per id in a deleteById request, instead of a _route_ parameter per request, I propose the following changes to the request format.
JSON:
"delete": { "id":"ID" , "_route_":"route"}
XML:
<delete>
<id "_route_"="shard1">123</id>
<id "_route_"="shard2">124</id>
</delete>
Similarly, together with
UpdateRequest.deleteById(List<String> ids),
I propose another method:
UpdateRequest.deleteById(List<String> ids, List<String> routes),
Here, I don't like the idea of list of encapsulated objects that contains both id and route, hence want to go with two lists. Any suggestions?
Also, like
UpdateRequest.deleteById(String id),
I propose another method:
UpdateRequest.deleteById(String id, String route)
> Delete silently fails if not sent to shard where document was added
> -------------------------------------------------------------------
>
> Key: SOLR-5890
> URL: https://issues.apache.org/jira/browse/SOLR-5890
> Project: Solr
> Issue Type: Bug
> Components: SolrCloud
> Affects Versions: 4.7
> Environment: Debian 7.4.
> Reporter: Peter Inglesby
> Assignee: Noble Paul
> Labels: difficulty-medium, impact-medium, workaround-exists
> Fix For: 5.0, Trunk
>
>
> We have SolrCloud set up with two shards, each with a leader and a replica. We use haproxy to distribute requests between the four nodes.
> Regardless of which node we send an add request to, following a commit, the newly-added document is returned in a search, as expected.
> However, we can only delete a document if the delete request is sent to a node in the shard where the document was added. If we send the delete request to a node in the other shard (and then send a commit) the document is not deleted. Such a delete request will get a 200 response, with the following body:
> {'responseHeader'=>{'status'=>0,'QTime'=>7}}
> Apart from the the very low QTime, this is indistinguishable from a successful delete.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org