Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] Skip claiming tasks that were modified during the task claiming…
… phase (elastic#198711) (elastic#199251) # Backport This will backport the following commits from `main` to `8.x`: - [Skip claiming tasks that were modified during the task claiming phase (elastic#198711)](elastic#198711) <!--- 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-07T03:15:31Z","message":"Skip claiming tasks that were modified during the task claiming phase (elastic#198711)\n\nResolves https://github.com/elastic/kibana/issues/196300\r\n\r\nIn this PR, I'm removing the fallback we had when `startedAt` value is\r\nmissing (elastic#194759) in favour of\r\ndropping the task document from the claiming cycle. The additional logs\r\nthat were added showed that tasks that were missing a `startedAt` value\r\nwas because they were being re-created during the exact same time they\r\nwere being claimed, causing the task to have an `idle` status and a\r\nmissing `startedAt` value. Given the scenario, it feels better to drop\r\nthem from getting claimed and to instead try again at the next claim\r\ncycle where the race condition shouldn't occur.","sha":"a19dd8ea97bae73dc69ba71e74917e80f091a8a1","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:version","v8.17.0"],"title":"Skip claiming tasks that were modified during the task claiming phase","number":198711,"url":"https://github.com/elastic/kibana/pull/198711","mergeCommit":{"message":"Skip claiming tasks that were modified during the task claiming phase (elastic#198711)\n\nResolves https://github.com/elastic/kibana/issues/196300\r\n\r\nIn this PR, I'm removing the fallback we had when `startedAt` value is\r\nmissing (elastic#194759) in favour of\r\ndropping the task document from the claiming cycle. The additional logs\r\nthat were added showed that tasks that were missing a `startedAt` value\r\nwas because they were being re-created during the exact same time they\r\nwere being claimed, causing the task to have an `idle` status and a\r\nmissing `startedAt` value. Given the scenario, it feels better to drop\r\nthem from getting claimed and to instead try again at the next claim\r\ncycle where the race condition shouldn't occur.","sha":"a19dd8ea97bae73dc69ba71e74917e80f091a8a1"}},"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/198711","number":198711,"mergeCommit":{"message":"Skip claiming tasks that were modified during the task claiming phase (elastic#198711)\n\nResolves https://github.com/elastic/kibana/issues/196300\r\n\r\nIn this PR, I'm removing the fallback we had when `startedAt` value is\r\nmissing (elastic#194759) in favour of\r\ndropping the task document from the claiming cycle. The additional logs\r\nthat were added showed that tasks that were missing a `startedAt` value\r\nwas because they were being re-created during the exact same time they\r\nwere being claimed, causing the task to have an `idle` status and a\r\nmissing `startedAt` value. Given the scenario, it feels better to drop\r\nthem from getting claimed and to instead try again at the next claim\r\ncycle where the race condition shouldn't occur.","sha":"a19dd8ea97bae73dc69ba71e74917e80f091a8a1"}},{"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]>
- Loading branch information