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

doc: deprecate _primary and _replica shard option #26792

Merged
merged 8 commits into from
Oct 9, 2017

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Sep 26, 2017

Tells v6 users that we are going to remove these options in v7.

Related #26335

@dnhatn dnhatn added the >docs General docs changes label Sep 26, 2017
@dnhatn dnhatn requested a review from jasontedor September 26, 2017 15:44
@dakrone
Copy link
Member

dakrone commented Sep 26, 2017

@dnhatn we have special asciidoc syntax for deprecations, see: https://github.com/elastic/docs#additions-and-deprecations

@dnhatn
Copy link
Member Author

dnhatn commented Sep 26, 2017

Thanks @dakrone. I will update it.

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

I think that we should add deprecation logging for use of these preferences.

@dnhatn
Copy link
Member Author

dnhatn commented Oct 4, 2017

retest this please

@dnhatn
Copy link
Member Author

dnhatn commented Oct 4, 2017

Thanks @jasontedor for the suggestion. I have added deprecation logging for these parameters. Could you please have another look?

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

I left a few more, almost there.

@@ -199,12 +199,20 @@ private ShardIterator preferenceActiveShardIterator(IndexShardRoutingTable index
case LOCAL:
return indexShard.preferNodeActiveInitializingShardsIt(Collections.singleton(localNodeId));
case PRIMARY:
deprecationLogger.deprecated("[_primary] has been deprecated in 6.0+, and will be removed in 7.0; " +
Copy link
Member

Choose a reason for hiding this comment

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

The version here should be 6.1 (we are going to backport this to 6.x but not 6.0).

@@ -9,18 +9,21 @@ The `preference` is a query string parameter which can be set to:
[horizontal]
`_primary`::
The operation will go and be executed only on the primary
shards.
shards. deprecated[6.0.0, will be removed in 7.0, use `_only_nodes` or `_prefer_nodes`]
Copy link
Member

Choose a reason for hiding this comment

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

This should be 6.1.0.

@@ -1,5 +1,10 @@
---
"List of strings":
- skip:
version: " - 5.99.99"
Copy link
Member

Choose a reason for hiding this comment

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

Let's only skip to 6.0.99.

@dnhatn dnhatn added v6.1.0 :Search/Search Search-related issues that do not fall into other categories labels Oct 4, 2017
@jasontedor
Copy link
Member

@dnhatn Let's be careful when we merge this that the master branch does not break because of the BWC tests that use preferences. If you need help walking through how to test that locally, please let me know.

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

LGTM. This looks good, but please see my note about making sure that this doesn't break master because of the BWC tests there. So: a green CI PR build on this is not enough.

@dnhatn dnhatn merged commit cbef2b7 into elastic:6.x Oct 9, 2017
@dnhatn
Copy link
Member Author

dnhatn commented Oct 9, 2017

@jasontedor The BWC tests are good for this branch. Thanks a lot for your guidance.

@dnhatn dnhatn deleted the v6_doc_deprecate_shard_pref branch October 9, 2017 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>deprecation >docs General docs changes :Search/Search Search-related issues that do not fall into other categories v6.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants