Skip to content

Commit

Permalink
repair: check tasks local to given shard
Browse files Browse the repository at this point in the history
Currently task_manager_module::is_aborted checks the tasks local
to caller's shard on a given shard.

Fix the method to check the task map local to the given shard.

Fixes: scylladb#22156.

Closes scylladb#22161
  • Loading branch information
Deexie authored and avikivity committed Jan 6, 2025
1 parent d3f3e2a commit a91e037
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions repair/repair.cc
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,10 @@ size_t repair::task_manager_module::nr_running_repair_jobs() {
}

future<bool> repair::task_manager_module::is_aborted(const tasks::task_id& uuid, shard_id shard) {
return smp::submit_to(shard, [&] () {
auto it = get_local_tasks().find(uuid);
return it != get_local_tasks().end() && it->second->abort_requested();
return get_task_manager().container().invoke_on(shard, [name = get_name(), uuid] (tasks::task_manager& tm) {
auto module = tm.find_module(name);
auto it = module->get_local_tasks().find(uuid);
return it != module->get_local_tasks().end() && it->second->abort_requested();
});
}

Expand Down

0 comments on commit a91e037

Please sign in to comment.