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 indices without soft-deletes #50502

Merged
merged 5 commits into from
Jan 5, 2020

Conversation

dnhatn
Copy link
Member

@dnhatn dnhatn commented Dec 27, 2019

Soft-deletes will be enabled for all indices in 8.0. Hence, we should deprecate new indices without soft-deletes in 7.x.

@dnhatn dnhatn added >deprecation :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. v8.0.0 v7.6.0 labels Dec 27, 2019
@elasticmachine
Copy link
Collaborator

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

@dnhatn dnhatn requested a review from ywelsch December 29, 2019 21:40
@dnhatn dnhatn requested a review from ywelsch December 30, 2019 14:50
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -434,6 +437,11 @@ static Settings aggregateIndexSettings(ClusterState currentState, CreateIndexClu
* that will be used to create this index.
*/
MetaDataCreateIndexService.checkShardLimit(indexSettings, currentState);
if (indexSettings.getAsBoolean(IndexSettings.INDEX_SOFT_DELETES_SETTING.getKey(), true) == false) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to completely disallow setting this setting in 8.x? If so, should we always emit a warning, even if it's explicitly set to true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Users might be confused about the deprecation when creating indices for CCR in a mixed cluster between 7.x and 6.8 because they need to explicitly set the soft_deletes setting.

Copy link
Contributor

Choose a reason for hiding this comment

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

If mixed clusters with 6.8 is a worry, you can just check here that all nodes are 7.0+.
With the approach here, we will still have to support the setting for the full duration of 8.x (i.e. allow people to explicitly set soft-deletes true).

Copy link
Member Author

Choose a reason for hiding this comment

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

++. I will make this change in a follow-up.

@dnhatn
Copy link
Member Author

dnhatn commented Jan 5, 2020

@ywelsch Thanks for reviewing.

@dnhatn dnhatn merged commit 0c0f455 into elastic:master Jan 5, 2020
@dnhatn dnhatn deleted the deprecate-soft-deletes branch January 5, 2020 23:30
dnhatn added a commit to dnhatn/elasticsearch that referenced this pull request Jan 5, 2020
Soft-deletes will be enabled for all indices in 8.0. Hence, we should
deprecate new indices without soft-deletes in 7.x.
dnhatn added a commit that referenced this pull request Jan 6, 2020
Soft-deletes will be enabled for all indices in 8.0. Hence, we should
deprecate new indices without soft-deletes in 7.x.

Backport of #50502
dnhatn added a commit that referenced this pull request Jan 6, 2020
@dnhatn dnhatn mentioned this pull request Jan 9, 2020
14 tasks
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
Soft-deletes will be enabled for all indices in 8.0. Hence, we should 
deprecate new indices without soft-deletes in 7.x.
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
russcam added a commit to elastic/elasticsearch-net that referenced this pull request Feb 21, 2020
Relates: #4341, elastic/elasticsearch#50502

This commit marks the enabled setting on soft delete index settings
as obsolete, as setting enabled to false is deprecated.
Mpdreamz pushed a commit to elastic/elasticsearch-net that referenced this pull request Feb 21, 2020
Relates: #4341, elastic/elasticsearch#50502

This commit marks the enabled setting on soft delete index settings
as obsolete, as setting enabled to false is deprecated.
github-actions bot pushed a commit to elastic/elasticsearch-net that referenced this pull request Feb 21, 2020
Relates: #4341, elastic/elasticsearch#50502

This commit marks the enabled setting on soft delete index settings
as obsolete, as setting enabled to false is deprecated.
Mpdreamz pushed a commit to elastic/elasticsearch-net that referenced this pull request Feb 21, 2020
Relates: #4341, elastic/elasticsearch#50502

This commit marks the enabled setting on soft delete index settings
as obsolete, as setting enabled to false is deprecated.

Co-authored-by: Russ Cam <[email protected]>
russcam added a commit to elastic/elasticsearch-net that referenced this pull request Feb 23, 2020
Relates: #4341, elastic/elasticsearch#50502

This commit marks the enabled setting on soft delete index settings
as obsolete, as setting enabled to false is deprecated.

(cherry-picked from commit d86e258)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>deprecation :Distributed Indexing/Distributed A catch all label for anything in the Distributed Area. Please avoid if you can. v7.6.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants