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

Deprecate slicing on _uid. #29353

Merged
merged 4 commits into from
Apr 10, 2018
Merged

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Apr 3, 2018

_id should be used instead on 6.x.

`_id` should be used instead on 6.x.
@jpountz jpountz added :Search/Search Search-related issues that do not fall into other categories >deprecation v7.0.0 v6.3.0 labels Apr 3, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@@ -91,14 +97,22 @@ public SliceBuilder(String field, int id, int max) {
}

public SliceBuilder(StreamInput in) throws IOException {
this.field = in.readString();
String field = in.readString();
if (UidFieldMapper.NAME.equals(field) && in.getVersion().before(Version.V_6_3_0)) {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this is safe?

Like, if you slice on _uid in a mixed version cluster, will this cause you to get duplicate documents and to miss documents?

Copy link
Member

Choose a reason for hiding this comment

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

I see. You've made it safe below. I think that is worth a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do.

@jpountz
Copy link
Contributor Author

jpountz commented Apr 9, 2018

@nik9000 I added a comment as you suggested.

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

LGTM

@jpountz jpountz merged commit a091d95 into elastic:master Apr 10, 2018
@jpountz jpountz deleted the deprecate/slice_on_uid branch April 10, 2018 12:28
jpountz added a commit that referenced this pull request Apr 10, 2018
`_id` should be used instead on 6.x.
jpountz added a commit that referenced this pull request Apr 11, 2018
jpountz added a commit that referenced this pull request Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>deprecation :Search/Search Search-related issues that do not fall into other categories v6.3.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants