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

Fix delete enrich policy bug #52179

Merged
merged 5 commits into from
Feb 18, 2020
Merged

Fix delete enrich policy bug #52179

merged 5 commits into from
Feb 18, 2020

Conversation

gaobinlong
Copy link
Contributor

This PR relates to #51228.
The changes are:

  1. List all enrich index for the policy which will be deleted, and delete the concrete indices instead of a wildcard suffix.
  2. Add action.destructive_requires_name cluster setting in TransportDeleteEnrichPolicyActionTests#testDeleteIsNotLocked method, ensure the test result is always correct whether the setting is set to true or not.

@martijnvg martijnvg added the :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP label Feb 11, 2020
@elasticmachine
Copy link
Collaborator

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

@martijnvg martijnvg added the >bug label Feb 11, 2020
@martijnvg
Copy link
Member

Thanks @gaobinlong for opening this PR! We will be taking a look later.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Left a minor comment.

@martijnvg
Copy link
Member

@elasticmachine test this please

@martijnvg
Copy link
Member

@elasticmachine test this please

@martijnvg
Copy link
Member

Hey @gaobinlong the code style check failed. Can you run gradlew spotlessApplyand update this pr?

@gaobinlong
Copy link
Contributor Author

@martijnvg, OK, I have done that.

@martijnvg
Copy link
Member

@elasticmachine test this please

@martijnvg martijnvg merged commit a7ddbcf into elastic:master Feb 18, 2020
martijnvg pushed a commit to martijnvg/elasticsearch that referenced this pull request Feb 18, 2020
…delete index api (elastic#52179)

Don't rely on the delete index api to resolve all the enrich indices for a particular enrich policy using a '[policy_name]-*' wildcard expression. With this change, the delete policy api will resolve the indices to remove and pass that directly to the delete index api.

This resolves a bug, that if `action.destructive_requires_name` setting has been set to true then the delete policy api is unable to remove the enrich indices related to the policy being deleted.

Closes elastic#51228
martijnvg added a commit that referenced this pull request Feb 18, 2020
…delete index api (#52448)

Backport from #52179

Don't rely on the delete index api to resolve all the enrich indices for a particular enrich policy using a '[policy_name]-*' wildcard expression. With this change, the delete policy api will resolve the indices to remove and pass that directly to the delete index api.

This resolves a bug, that if `action.destructive_requires_name` setting has been set to true then the delete policy api is unable to remove the enrich indices related to the policy being deleted.

Closes #51228 

Co-authored-by: bellengao <gbl_long@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants