Skip to content

Commit

Permalink
[Response Ops][Task Manager] Add bulk update function that directly u…
Browse files Browse the repository at this point in the history
…pdates using the `esClient` (#191760)

Resolves #187704

## Summary

Creates a new `bulkPartialUpdate` function in the `task_store` class
that uses the ES client to perform bulk partial updates instead of the
Saved Objects client. Updates the update in the `mget` 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.

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
ymao1 and kibanamachine authored Sep 10, 2024
1 parent 20566d0 commit a141818
Show file tree
Hide file tree
Showing 7 changed files with 1,025 additions and 558 deletions.
8 changes: 8 additions & 0 deletions x-pack/plugins/task_manager/server/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ export interface ConcreteTaskInstance extends TaskInstance {
partition?: number;
}

export type PartialConcreteTaskInstance = Partial<ConcreteTaskInstance> & {
id: ConcreteTaskInstance['id'];
};

export interface ConcreteTaskInstanceVersion {
/** The _id of the the document (not the SO id) */
esId: string;
Expand Down Expand Up @@ -490,3 +494,7 @@ export type SerializedConcreteTaskInstance = Omit<
runAt: string;
partition?: number;
};

export type PartialSerializedConcreteTaskInstance = Partial<SerializedConcreteTaskInstance> & {
id: SerializedConcreteTaskInstance['id'];
};
Loading

0 comments on commit a141818

Please sign in to comment.