Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete api: remove broadcast delete if routing is missing when required
This commit changes the behaviour of the delete api when processing a delete request that refers to a type that has routing set to required in the mapping, and the routing is missing in the request. Up until now the delete api sent a broadcast delete request to all of the shards that belong to the index, making sure that the document could be found although the routing value wasn't specified. This was probably not the best choice: if the routing is set to required, an error should be thrown instead. A `RoutingMissingException` gets now thrown instead, like it happens in the same situation with every other api (index, update, get etc.). Last but not least, this change allows to get rid of a couple of `TransportAction`s, `Request`s and `Response`s and simplify the codebase. Closes #9123 Closes #10136
- Loading branch information
Showing
16 changed files
with
30 additions
and
703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
src/main/java/org/elasticsearch/action/delete/IndexDeleteRequest.java
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
src/main/java/org/elasticsearch/action/delete/IndexDeleteResponse.java
This file was deleted.
Oops, something went wrong.
123 changes: 0 additions & 123 deletions
123
src/main/java/org/elasticsearch/action/delete/ShardDeleteRequest.java
This file was deleted.
Oops, something went wrong.
65 changes: 0 additions & 65 deletions
65
src/main/java/org/elasticsearch/action/delete/ShardDeleteResponse.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.