-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Response Ops][Task Manager] Setting task status directly to running
in mget
claim strategy
#191669
Conversation
running
in mget
claim strategy
Pinging @elastic/response-ops (Team:ResponseOps) |
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.
code review only, changes look good 👍
@elasticmachine merge upstream |
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.
Changes LGTM! Tested locally using update_by_query and mget and worked as expected.
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @ymao1 |
…`running` in `mget` claim strategy (elastic#191669)" This reverts commit ba0485e.
… `running` in `mget` claim strategy (elastic#191669)" This reverts commit 689f227.
… `running` in `mget` claim strategy (#192303) Re-doing this PR: #191669 Reverted because it was causing a flaky test. After a lot of investigation, it looks like the flakiness was caused by interference from long-running tasks scheduled as part of other tests. The task partitions test uses task IDs `1`, `2` and `3` and the tasks were being short circuited when there were other tasks with UUIDs that started with `1`, `2` or `3` due to the logic in the task runner that tries to prevent duplicate recurring tasks from running. That logic just used `startsWith` to test for duplicates where the identifier is `${task.id}::${task.executionUUID}`. Updated that logic instead to check for duplicate `task.id` instead of just using `startsWith` in this commit: 1646ae9 --------- Co-authored-by: Elastic Machine <[email protected]>
Resolves #184739
Summary
During the
mget
task claim strategy, we set the task directly torunning
with the appropriateretryAt
value instead of setting it toclaiming
and letting the task runner set the task torunning
. This removes a task update from the claiming process. Updates the task runner to skip themarkTaskAsRunning
function if the claim strategy ismget
and move the task directly to "ready to run".