Skip to content

Make noop template updates be cluster state noops#57851

Merged
dakrone merged 2 commits intoelastic:masterfrom
dakrone:itv2-unchanged-noop
Jun 9, 2020
Merged

Make noop template updates be cluster state noops#57851
dakrone merged 2 commits intoelastic:masterfrom
dakrone:itv2-unchanged-noop

Conversation

@dakrone
Copy link
Copy Markdown
Member

@dakrone dakrone commented Jun 8, 2020

When updating an existing component or composable template that is identical to the existing
template, we now skip doing a cluster state update.

Resolves #57662

When updating an existing component or composable template that is identical to the existing
template, we now skip doing a cluster state update.

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.9.0 labels Jun 8, 2020
@dakrone dakrone requested review from andreidan and probakowski June 8, 2020 23:05
@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 Jun 8, 2020
Copy link
Copy Markdown
Contributor

@probakowski probakowski left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Lee!

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.

LGTM nice optimisation

@dakrone dakrone merged commit 08fc2ca into elastic:master Jun 9, 2020
@dakrone dakrone deleted the itv2-unchanged-noop branch June 9, 2020 14:08
dakrone added a commit to dakrone/elasticsearch that referenced this pull request Jun 9, 2020
When updating an existing component or composable template that is identical to the existing
template, we now skip doing a cluster state update.

Resolves elastic#57662
dakrone added a commit that referenced this pull request Jun 9, 2020
)

Backports the following commits to 7.x:

    Make noop template updates be cluster state noops (#57851)
@ywelsch
Copy link
Copy Markdown
Contributor

ywelsch commented Jun 29, 2020

Maybe we should backport this to 7.8 given the relation to SDH cases.

dakrone added a commit to dakrone/elasticsearch that referenced this pull request Jun 29, 2020
Backports the following commits to 7.8:

    Make noop template updates be cluster state noops (elastic#57851)
@dakrone dakrone added the v7.8.1 label Jun 29, 2020
dakrone added a commit that referenced this pull request Jun 29, 2020
)

Backports the following commits to 7.8:

    Make noop template updates be cluster state noops (#57851)
@jhughes-mc
Copy link
Copy Markdown

It's our understanding this will help out our problem, but Elastic Cloud support seems to think it won't. If our filebeat agents are all set to automatically publish the template, won't this significantly reduce the cluster workload since it won't be trying to update the cluster state after each agent attempts to push a template that isn't changing?

@dakrone
Copy link
Copy Markdown
Member Author

dakrone commented Jul 21, 2020

@jhughes-mc it will help with the workload, however, this work only applies to composable and component templates, not legacy templates, so I couldn't say for sure whether this will help you, it would depend on which templates were being used.

dakrone added a commit to dakrone/elasticsearch that referenced this pull request 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 elastic#57851
Resolves elastic#57662
dakrone added a commit that referenced this pull request 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
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
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.8.1 v7.9.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streamline no-op template updates

8 participants