Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return of wrong request type on failed updates #6646

Merged
merged 2 commits into from Jul 2, 2014

Conversation

spinscale
Copy link
Contributor

In case an update request failed (for example when updating with a
wrongly formatted date), the returned index operation type was index
instead of update.

Closes #6630

@@ -309,7 +309,7 @@ protected ShardIterator shards(ClusterState clusterState, BulkShardRequest reque
} else {
logger.debug("[{}][{}] failed to execute bulk item (index) {}", t, shardRequest.request.index(), shardRequest.shardId, indexRequest);
}
responses[requestIndex] = new BulkItemResponse(item.id(), indexRequest.opType().lowercase(),
responses[requestIndex] = new BulkItemResponse(item.id(), "update",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit of nitpicking here: can we use a constant? I see that we use the same string many times in this class. Same could be done for delete and the other string constants as well while we are at it (could be a separate change though)...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a second commit with delete and update constants, index is not needed as it is always extracted from the request operation type

@javanna
Copy link
Member

javanna commented Jun 30, 2014

Left a small comment, LGTM otherwise!

@javanna javanna removed the review label Jul 1, 2014
@javanna
Copy link
Member

javanna commented Jul 1, 2014

LGTM

@s1monw
Copy link
Contributor

s1monw commented Jul 2, 2014

LGTM should go into 1.2 too

In case an update request failed (for example when updating with a
wrongly formatted date), the returned index operation type was index
instead of update.

Closes elastic#6630
in TransportShardBulkAction after fixing an issue.
@spinscale spinscale merged commit 4091162 into elastic:master Jul 2, 2014
@clintongormley clintongormley changed the title Bulk API: Fix return of wrong request type on failed updates Fix return of wrong request type on failed updates Jun 7, 2015
@lcawl lcawl added :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. and removed :Bulk labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v1.2.2 v1.3.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bulk API: Fix return of wrong request type on failed updates
5 participants