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

Remove Client.prepareIndex(index, type, id) method #48443

Merged

Conversation

romseygeek
Copy link
Contributor

@romseygeek romseygeek commented Oct 24, 2019

As types are no longer used in index requests, we can remove the type parameter
from prepareIndex methods in the Client interface. However, just changing the signature
of prepareIndex(index, type, id) to prepareIndex(index, id) risks confusion when
upgrading with the previous (now removed) prepareIndex(index, type) method -
just changing the dependency version of java code would end up silently changing the
semantics of the method call. Instead we should just remove this method entirely, and
replace it by calling prepareIndex(index).setId(id)

@romseygeek romseygeek added :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. :Core/Infra/Transport API Transport client API >breaking-java v8.0.0 labels Oct 24, 2019
@romseygeek romseygeek self-assigned this Oct 24, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Transport API)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (:Distributed/CRUD)

@romseygeek
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM. Note on terminology: the change here is not to the "transport client", as that has been removed. This is to the Client interface, which is essentially now just the node client (the client nodes use to communicate with each other, over the transport protocol, but sometimes also does local node requests).

@romseygeek romseygeek changed the title Remove prepareIndex(index, type, id) method from the transport client Remove Client.prepareIndex(index, type, id) method Oct 25, 2019
@romseygeek
Copy link
Contributor Author

Note on terminology: the change here is not to the "transport client", as that has been removed. This is to the Client interface, which is essentially now just the node client (the client nodes use to communicate with each other, over the transport protocol, but sometimes also does local node requests).

Thanks @rjernst, I've updated the description and title accordingly

@romseygeek romseygeek merged commit 750c6d8 into elastic:master Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking-java :Core/Infra/Transport API Transport client API :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants