Skip to content

Make legacy template noop updates not change cluster state#64493

Merged
dakrone merged 2 commits intoelastic:masterfrom
dakrone:legacy-template-noop
Nov 2, 2020
Merged

Make legacy template noop updates not change cluster state#64493
dakrone merged 2 commits intoelastic:masterfrom
dakrone:legacy-template-noop

Conversation

@dakrone
Copy link
Copy Markdown
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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. v8.0.0 v7.11.0 labels Nov 2, 2020
@dakrone dakrone requested a review from andreidan November 2, 2020 16:32
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

@elasticmachine elasticmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Nov 2, 2020
Copy link
Copy Markdown
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

}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/pull/57393")
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

@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 DO NOT USE. Use ":Distributed/Indices APIs" or ":StorageEngine/Templates" instead. >enhancement Team:Data Management (obsolete) DO NOT USE. This team no longer exists. 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