-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Remove deprecated created and found from index, delete and bulk #25516
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
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.
I left two minor things. Otherwise I think this looks good!
Thanks for working on it @olcbean!
@Override | ||
public DeleteResponse build() { | ||
DeleteResponse deleteResponse = new DeleteResponse(shardId, type, id, seqNo, primaryTerm, version, found); | ||
DeleteResponse deleteResponse = new DeleteResponse(shardId, type, id, seqNo, primaryTerm, version, |
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.
I think you should pass the Result here. Maybe also add an assertion in the ctor that the result is either Result.DELETED
or Result.NOT_FOUND
.
@Override | ||
public IndexResponse build() { | ||
IndexResponse indexResponse = new IndexResponse(shardId, type, id, seqNo, primaryTerm, version, created); | ||
IndexResponse indexResponse = new IndexResponse(shardId, type, id, seqNo, primaryTerm, version, | ||
result == Result.CREATED ? true : false); |
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.
Same deal here as on Delete. I think you should pass the result
into the ctor and assert
that it is sane.
@@ -138,7 +136,6 @@ The result of this bulk operation is: | |||
"successful": 1, | |||
"failed": 0 | |||
}, | |||
"created": true, |
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.
I'm so glad we assert that these are right now!
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.
This is exactly the kind of thing I'd miss when removing these without the assertions.
Marked as |
@nik9000 thanks for the feedback! Just pushed a new commit |
This reverts commit bde2156.
Ah! I see now. The way you had it first was better. I'll revert the second commit and merge. |
Thanks @olcbean! I've merged to master. |
* master: Remove deprecated created and found from index, delete and bulk (elastic#25516) fix testEnsureVersionCompatibility for 5.5.0 release fix Version.v6_0_0 min compatibility version to 5.5.0 Add bwc indices for 5.5.0 Add v5_5_1 constant [DOCS] revise high level client Search Scroll API docs (elastic#25599) Improve REST error handling when endpoint does not support HTTP verb, add OPTIONS support (elastic#24437) Avoid SecurityException in repository-S3 on DefaultS3OutputStream.flush() (elastic#25254) [Tests] Add tests for CompletionSuggestionBuilder#build() (elastic#25575)
* master: (42 commits) Harden global checkpoint tracker Remove deprecated created and found from index, delete and bulk (elastic#25516) fix testEnsureVersionCompatibility for 5.5.0 release fix Version.v6_0_0 min compatibility version to 5.5.0 Add bwc indices for 5.5.0 Add v5_5_1 constant [DOCS] revise high level client Search Scroll API docs (elastic#25599) Improve REST error handling when endpoint does not support HTTP verb, add OPTIONS support (elastic#24437) Avoid SecurityException in repository-S3 on DefaultS3OutputStream.flush() (elastic#25254) [Tests] Add tests for CompletionSuggestionBuilder#build() (elastic#25575) Enable cross-setting validation [Docs] Fix typo in bootstrap-checks.asciidoc (elastic#25597) Index ids in binary form. (elastic#25352) bwc checkout should fetch from all remotes IndexingIT should check for global checkpoints regardless of master version [Tests] Add tests for PhraseSuggestionBuilder#build() (elastic#25571) Remove unused class MinimalMap (elastic#25590) [Docs] Document Scroll API for Java High Level REST Client (elastic#25554) Disable date field mapping changing (elastic#25285) Allow BWC Testing against a specific branch (elastic#25510) ...
@nik9000 Excellent, this is what I was hoping the final change to look like. Sorry about the confusion with the belated push earlier :) |
Added 'result' field to Elasticsearch QueryResult struct for compatibility with 6.x Index and Delete API responses. See elastic/elasticsearch#25516 for more info. Fixes elastic#4661
Added 'result' field to Elasticsearch QueryResult struct for compatibility with 6.x Index and Delete API responses. See elastic/elasticsearch#25516 for more info. Fixes #4661
The
created
andfound
fields in index and delete responses became obsolete after the introduction of theresult
field in index, update and delete responses (#19566).After deprecating the
created
andfound
fields in 5.x (#19633), now they are removed.Fixes #19630