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
Fix return of wrong request type on failed updates #6646
Conversation
@@ -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", |
There was a problem hiding this comment.
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)...
There was a problem hiding this comment.
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
Left a small comment, LGTM otherwise! |
LGTM |
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.
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