From 0ed34527215dbffd226fc0f60d5e90cb6a089fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Paszkowski?= Date: Fri, 21 Nov 2025 17:16:40 +0100 Subject: [PATCH] service/storage_service: Mark nodes excluded on shard0 Excluding nodes is a group0 operation and as such it needs to be executed onyl on shard0. In case, the method `mark_excluded` is invoked on a different shard, redirect the request to shard0. Fixes https://github.com/scylladb/scylladb/issues/27129 Closes scylladb/scylladb#27167 --- service/storage_service.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/service/storage_service.cc b/service/storage_service.cc index 333eaeda83..c66f99d0bc 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -4292,6 +4292,13 @@ future<> storage_service::raft_removenode(locator::host_id host_id, locator::hos } future<> storage_service::mark_excluded(const std::vector& hosts) { + if (this_shard_id() != 0) { + // group0 is only set on shard 0. + co_return co_await container().invoke_on(0, [&] (auto& ss) { + return ss.mark_excluded(hosts); + }); + } + while (true) { auto guard = co_await _group0->client().start_operation(_group0_as, raft_timeout{});