elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.6k stars 8.22k forks source link

[ResponseOps][Task Manager] unrecognized tasks are not updated when mget task claimer is used #192686

Open pmuellr opened 1 month ago

pmuellr commented 1 month ago

As part of the recent changes to x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts, we removed the code that marks tasks with removedTypes to Unrecognized.

You can see that code in a previous version of the module: https://github.com/elastic/kibana/blob/9653d7e1fcf1b894728ae7502dd6b0e290e25321/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts#L261-L290

Current thinking is that task manager should have a recurring task running, that can perform these updates. Task Manager's first recurring background task? \o/

These updates are not critical, they are more cleanliness, so we don't need to put the system through a lot of stress, often. Maybe once an hour, do a few thousand?

In theory we won't have version/OCC issues here, as TM will not be otherwise claiming these tasks.

Definition of Done

elasticmachine commented 1 month ago

Pinging @elastic/response-ops (Team:ResponseOps)

mikecote commented 3 weeks ago

I was able to get the functionality by doing the following within the mget claim strategy

      OneOfTaskTypes(
        'task.taskType',
        claimPartitions.unlimitedTypes.concat(Array.from(removedTypes))
      ),

This will merge in this PR => https://github.com/elastic/kibana/pull/196399 but it would be nice to have this part of a background task instead.