-
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
Remove stale tasks from task conflict count during task claiming #198416
Remove stale tasks from task conflict count during task claiming #198416
Conversation
💚 Build Succeeded
Metrics [docs]
History
cc @mikecote |
Pinging @elastic/response-ops (Team:ResponseOps) |
If someone has a better name than
|
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
Starting backport for target branches: 8.x |
…stic#198416) In this PR, I'm removing the count of stale tasks from the number of conflicts during the claiming cycle. I am also adding a new property to the task manager health report (`claim_stale_tasks`) so we can track those separately to ensure we have the proper page size. ## To verify Apply the following diff, observe the new `claim_stale_tasks` in the TM health API and that conflicts are 0 ``` diff --git a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts index 4e74454e8c9..35d7fd872d8 100644 --- a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts +++ b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts @@ -145,6 +145,7 @@ async function claimAvailableTasks(opts: TaskClaimerOpts): Promise<ClaimOwnershi } if ( + false && searchVersion.seqNo === latestVersion.seqNo && searchVersion.primaryTerm === latestVersion.primaryTerm ) { ``` (cherry picked from commit 37ebf29)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
#198416) (#198666) # Backport This will backport the following commits from `main` to `8.x`: - [Remove stale tasks from task conflict count during task claiming (#198416)](#198416) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Mike Côté","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-01T12:19:04Z","message":"Remove stale tasks from task conflict count during task claiming (#198416)\n\nIn this PR, I'm removing the count of stale tasks from the number of\r\nconflicts during the claiming cycle. I am also adding a new property to\r\nthe task manager health report (`claim_stale_tasks`) so we can track\r\nthose separately to ensure we have the proper page size.\r\n\r\n## To verify\r\nApply the following diff, observe the new `claim_stale_tasks` in the TM\r\nhealth API and that conflicts are 0\r\n```\r\ndiff --git a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\nindex 4e74454e8c9..35d7fd872d8 100644\r\n--- a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\n+++ b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\n@@ -145,6 +145,7 @@ async function claimAvailableTasks(opts: TaskClaimerOpts): Promise<ClaimOwnershi\r\n }\r\n\r\n if (\r\n+ false &&\r\n searchVersion.seqNo === latestVersion.seqNo &&\r\n searchVersion.primaryTerm === latestVersion.primaryTerm\r\n ) {\r\n```","sha":"37ebf29f87047e8b96e3c2cd378c647a4f2ca797","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:Task Manager","Team:ResponseOps","v9.0.0","backport:prev-minor","v8.17.0"],"title":"Remove stale tasks from task conflict count during task claiming","number":198416,"url":"https://github.com/elastic/kibana/pull/198416","mergeCommit":{"message":"Remove stale tasks from task conflict count during task claiming (#198416)\n\nIn this PR, I'm removing the count of stale tasks from the number of\r\nconflicts during the claiming cycle. I am also adding a new property to\r\nthe task manager health report (`claim_stale_tasks`) so we can track\r\nthose separately to ensure we have the proper page size.\r\n\r\n## To verify\r\nApply the following diff, observe the new `claim_stale_tasks` in the TM\r\nhealth API and that conflicts are 0\r\n```\r\ndiff --git a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\nindex 4e74454e8c9..35d7fd872d8 100644\r\n--- a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\n+++ b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\n@@ -145,6 +145,7 @@ async function claimAvailableTasks(opts: TaskClaimerOpts): Promise<ClaimOwnershi\r\n }\r\n\r\n if (\r\n+ false &&\r\n searchVersion.seqNo === latestVersion.seqNo &&\r\n searchVersion.primaryTerm === latestVersion.primaryTerm\r\n ) {\r\n```","sha":"37ebf29f87047e8b96e3c2cd378c647a4f2ca797"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198416","number":198416,"mergeCommit":{"message":"Remove stale tasks from task conflict count during task claiming (#198416)\n\nIn this PR, I'm removing the count of stale tasks from the number of\r\nconflicts during the claiming cycle. I am also adding a new property to\r\nthe task manager health report (`claim_stale_tasks`) so we can track\r\nthose separately to ensure we have the proper page size.\r\n\r\n## To verify\r\nApply the following diff, observe the new `claim_stale_tasks` in the TM\r\nhealth API and that conflicts are 0\r\n```\r\ndiff --git a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\nindex 4e74454e8c9..35d7fd872d8 100644\r\n--- a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\n+++ b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts\r\n@@ -145,6 +145,7 @@ async function claimAvailableTasks(opts: TaskClaimerOpts): Promise<ClaimOwnershi\r\n }\r\n\r\n if (\r\n+ false &&\r\n searchVersion.seqNo === latestVersion.seqNo &&\r\n searchVersion.primaryTerm === latestVersion.primaryTerm\r\n ) {\r\n```","sha":"37ebf29f87047e8b96e3c2cd378c647a4f2ca797"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Mike Côté <[email protected]>
…stic#198416) In this PR, I'm removing the count of stale tasks from the number of conflicts during the claiming cycle. I am also adding a new property to the task manager health report (`claim_stale_tasks`) so we can track those separately to ensure we have the proper page size. ## To verify Apply the following diff, observe the new `claim_stale_tasks` in the TM health API and that conflicts are 0 ``` diff --git a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts index 4e74454e8c9..35d7fd872d8 100644 --- a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts +++ b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts @@ -145,6 +145,7 @@ async function claimAvailableTasks(opts: TaskClaimerOpts): Promise<ClaimOwnershi } if ( + false && searchVersion.seqNo === latestVersion.seqNo && searchVersion.primaryTerm === latestVersion.primaryTerm ) { ```
In this PR, I'm removing the count of stale tasks from the number of conflicts during the claiming cycle. I am also adding a new property to the task manager health report (
claim_stale_tasks
) so we can track those separately to ensure we have the proper page size.To verify
Apply the following diff, observe the new
claim_stale_tasks
in the TM health API and that conflicts are 0