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

Make legacy template noop updates not change cluster state #64493

Merged
merged 2 commits into from
Nov 2, 2020

Conversation

dakrone
Copy link
Member

@dakrone dakrone commented Nov 2, 2020

When a legacy template does not change, there is no need to create and publish a new cluster state,
rather the update should be a noop.

Relates to #57851
Resolves #57662

When a legacy template does not change, there is no need to create and publish a new cluster state,
rather the update should be a noop.

Relates to elastic#57851
Resolves elastic#57662
@dakrone dakrone added :Data Management/Indices APIs APIs to create and manage indices and templates v8.0.0 v7.11.0 labels Nov 2, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Nov 2, 2020
Copy link
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this Lee.

LGTM

@@ -727,7 +749,6 @@ public void testFindV2InvalidGlobalTemplate() {
}
}

@AwaitsFix(bugUrl = "https:/elastic/elasticsearch/pull/57393")
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be related to composable templates, the mentioned PR was abandoned though. Is this really fixed? Or was this muted by accident initially?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was fixed in the past with Julie's mappings merging, the test was just never unmuted (it's fixed now though)

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

Thanks @dakrone, LGTM2

@dakrone dakrone merged commit b323d4c into elastic:master Nov 2, 2020
@dakrone dakrone deleted the legacy-template-noop branch November 2, 2020 17:56
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Nov 2, 2020
…4493)

When a legacy template does not change, there is no need to create and publish a new cluster state,
rather the update should be a noop.

Relates to elastic#57851
Resolves elastic#57662
dakrone added a commit that referenced this pull request Nov 2, 2020
) (#64498)

Backports the following commits to 7.x:

    Make legacy template noop updates not change cluster state (#64493)
Leaf-Lin added a commit to elastic/apm-server that referenced this pull request Nov 27, 2020
Similar to elastic/beats#22357, setup.template.overwrite could potentially overload Elasticsearch with too many update requests. 
On Elasticsearch side, it will be addressed in newer versions by introducing no-op updates which will be available from 7.11+ elastic/elasticsearch#64493

See also elastic/elasticsearch#57662

Thought having some warnings in the APM setting here should prevent users unwittingly leave template auto-creation on across large number of APM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Indices APIs APIs to create and manage indices and templates >enhancement Team:Data Management Meta label for data/management team v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streamline no-op template updates
6 participants