mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
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
This commit is contained in:
committed by
Tomasz Grabiec
parent
c3c0991428
commit
0ed3452721
@@ -4292,6 +4292,13 @@ future<> storage_service::raft_removenode(locator::host_id host_id, locator::hos
|
||||
}
|
||||
|
||||
future<> storage_service::mark_excluded(const std::vector<locator::host_id>& 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{});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user