-
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] Add bulk update function that directly updates using the esClient
#191760
Conversation
09928f5
to
defa6ba
Compare
esClient
@@ -302,23 +307,13 @@ export class TaskStore { | |||
*/ | |||
public async bulkUpdate( | |||
docs: ConcreteTaskInstance[], | |||
{ validate, excludeLargeFields = false }: BulkUpdateOpts |
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.
these changes were originally made so we could exclude the state
and params
from being updated in the mget
claim strategy but they are not needed anymore since we can do real partial updates through the ES client.
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#6900[✅] x-pack/test/task_manager_claimer_mget/config.ts: 100/100 tests passed. |
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.
Changes LGTM! Tested locally and works great!
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, left a nit comment
task.status = TaskStatus.Unrecognized; | ||
tasksToRemoveUpdates.push({ | ||
id: task.id, | ||
version: task.version, |
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.
I think we probably have the seqNum/primaryTerm for these, in docLatestVersions
, however I'm guessing you used the version
to save from having to create another extremely similar type :-)
I'm wondering, for the removal of unrecognized tasks, maybe we don't even need the version? These docs shouldn't be updated by anyone anyway, except this code to update their status
.
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.
Makes sense to me. Updated in e05a977
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @ymao1 |
Resolves #187704
Summary
Creates a new
bulkPartialUpdate
function in thetask_store
class that uses the ES client to perform bulk partial updates instead of the Saved Objects client. Updates the update in themget
task claimer to use this new function.To verify
Run this branch with the
xpack.task_manager.claim_strategy: 'mget'
and ensure that all tasks are running as expected.