-
Couldn't load subscription status.
- Fork 25.6k
Fix async enrich execution prematurely releases enrich policy lock #94702
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
Conversation
| Hi @jbaiera, I've created a changelog YAML for you. |
x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutor.java Show resolved Hide resolved
x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutor.java Show resolved Hide resolved
| Pinging @elastic/es-data-management (Team:Data Management) |
...ck/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutorTests.java Outdated Show resolved Hide resolved
...ck/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutorTests.java Show resolved Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…lastic#94702) This PR ups the timeout on the EnrichExecutor's task API call and adds additional logic in the event that the task await call fails. Without this change, the task API call can timeout and unlock the policy prematurely. Premature unlocking can lead to the index being removed while the policy is executing. (cherry picked from commit f56fc01) # Conflicts: # x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutor.java
…94702) (#94837) This PR ups the timeout on the EnrichExecutor's task API call and adds additional logic in the event that the task await call fails. Without this change, the task API call can timeout and unlock the policy prematurely. Premature unlocking can lead to the index being removed while the policy is executing. (cherry picked from commit f56fc01)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…lastic#94702) This PR ups the timeout on the EnrichExecutor's task API call and adds additional logic in the event that the task await call fails. Without this change, the task API call can timeout and unlock the policy prematurely. Premature unlocking can lead to the index being removed while the policy is executing. (cherry picked from commit f56fc01) # Conflicts: # x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutor.java # x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutorTests.java
…94702) (#94841) This PR ups the timeout on the EnrichExecutor's task API call and adds additional logic in the event that the task await call fails. Without this change, the task API call can timeout and unlock the policy prematurely. Premature unlocking can lead to the index being removed while the policy is executing. (cherry picked from commit f56fc01) # Conflicts: # x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutor.java # x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutorTests.java
When submitting an enrich policy execution with
wait_for_completion=false, the master node that services the request needs to wait on the remote task to complete so that it may unlock the policy for further runs. It currently does not set a timeout for the Get Task API call, which has a default timeout of 30 seconds. This is almost never enough time to cover an executing enrich policy. At the end of the timeout, the policy is unlocked without any further logic applied. This leaves the new enrich index that is under construction open to be deleted by the background maintenance task.This PR is a quick fix for the problem. It ups the timeout on the get task API and adds additional logic in the event that the task await call fails.
fixes #94690