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

Merged
merged 3 commits into from Jul 7, 2017

Conversation

Projects
None yet
4 participants
@olcbean
Contributor

olcbean commented Jul 3, 2017

The created and found fields in index and delete responses became obsolete after the introduction of the result field in index, update and delete responses (#19566).

After deprecating the created and found fields in 5.x (#19633), now they are removed.

Fixes #19630

@elasticmachine

This comment has been minimized.

Show comment
Hide comment
@elasticmachine

elasticmachine Jul 3, 2017

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?

elasticmachine commented Jul 3, 2017

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?

@nik9000

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,

This comment has been minimized.

@nik9000

nik9000 Jul 3, 2017

Contributor

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.

@nik9000

nik9000 Jul 3, 2017

Contributor

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);

This comment has been minimized.

@nik9000

nik9000 Jul 3, 2017

Contributor

Same deal here as on Delete. I think you should pass the result into the ctor and assert that it is sane.

@nik9000

nik9000 Jul 3, 2017

Contributor

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,

This comment has been minimized.

@nik9000

nik9000 Jul 3, 2017

Contributor

I'm so glad we assert that these are right now!

@nik9000

nik9000 Jul 3, 2017

Contributor

I'm so glad we assert that these are right now!

This comment has been minimized.

@nik9000

nik9000 Jul 3, 2017

Contributor

This is exactly the kind of thing I'd miss when removing these without the assertions.

@nik9000

nik9000 Jul 3, 2017

Contributor

This is exactly the kind of thing I'd miss when removing these without the assertions.

@nik9000

This comment has been minimized.

Show comment
Hide comment
@nik9000

nik9000 Jul 3, 2017

Contributor

Marked as breaking because it is but that is ok because it removes deprecated response parameters that have had an alternate way to read them for most of the 5.x series.

Contributor

nik9000 commented Jul 3, 2017

Marked as breaking because it is but that is ok because it removes deprecated response parameters that have had an alternate way to read them for most of the 5.x series.

@olcbean

This comment has been minimized.

Show comment
Hide comment
@olcbean

olcbean Jul 5, 2017

Contributor

@nik9000 thanks for the feedback! Just pushed a new commit

Contributor

olcbean commented Jul 5, 2017

@nik9000 thanks for the feedback! Just pushed a new commit

@nik9000

This comment has been minimized.

Show comment
Hide comment
@nik9000

nik9000 Jul 7, 2017

Contributor

Ah! I see now. The way you had it first was better. I'll revert the second commit and merge.

Contributor

nik9000 commented Jul 7, 2017

Ah! I see now. The way you had it first was better. I'll revert the second commit and merge.

@nik9000 nik9000 merged commit 2ba9fd2 into elastic:master Jul 7, 2017

1 check passed

CLA Commit author has signed the CLA
Details
@nik9000

This comment has been minimized.

Show comment
Hide comment
@nik9000

nik9000 Jul 7, 2017

Contributor

Thanks @olcbean! I've merged to master.

Contributor

nik9000 commented Jul 7, 2017

Thanks @olcbean! I've merged to master.

jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jul 7, 2017

Merge branch 'master' into disk-threshold-settings-validation
* 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)

jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jul 7, 2017

Merge branch 'master' into restore-local-checkpoint-tracker
* 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)
  ...
@olcbean

This comment has been minimized.

Show comment
Hide comment
@olcbean

olcbean Jul 8, 2017

Contributor

@nik9000 Excellent, this is what I was hoping the final change to look like. Sorry about the confusion with the belated push earlier :)

Contributor

olcbean commented Jul 8, 2017

@nik9000 Excellent, this is what I was hoping the final change to look like. Sorry about the confusion with the belated push earlier :)

@olcbean olcbean deleted the olcbean:remove_created branch Jul 8, 2017

andrewkroh added a commit to andrewkroh/beats that referenced this pull request Jul 13, 2017

Added 'result' field to Elasticsearch QueryResult
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

ruflin added a commit to elastic/beats that referenced this pull request Jul 14, 2017

Added 'result' field to Elasticsearch QueryResult
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

@colings86 colings86 added v6.0.0-beta1 and removed v6.0.0 labels Jul 31, 2017

ramon-garcia added a commit to ramon-garcia/beats that referenced this pull request Dec 5, 2017

Added 'result' field to Elasticsearch QueryResult
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

athom added a commit to athom/beats that referenced this pull request Jan 25, 2018

Added 'result' field to Elasticsearch QueryResult
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment