mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 05:26:58 +00:00
storage_service: disable removenode --force in raft mode and deprecate it for gossiper mode
removenode --force is an unsafe operation and does not even make sense with topology over raft. This patch disables it if raft is enabled and prints a deprecation note otherwise. We already have a PR to remove it (https://github.com/scylladb/scylladb/pull/15834), but it was decided there that a deprecation period is needed for legacy use case. Fixes: scylladb/scylladb#16293
This commit is contained in:
committed by
Kamil Braun
parent
9ee728dab9
commit
fe5853aacc
@@ -6227,6 +6227,11 @@ future<sstring> storage_service::get_removal_status() {
|
||||
}
|
||||
|
||||
future<> storage_service::force_remove_completion() {
|
||||
if (raft_topology_change_enabled()) {
|
||||
return make_exception_future<>(std::runtime_error("The unsafe nodetool removenode force is not supported anymore"));
|
||||
}
|
||||
|
||||
slogger.warn("The unsafe nodetool removenode force is deprecated and will not be supported in future releases");
|
||||
return run_with_no_api_lock([] (storage_service& ss) -> future<> {
|
||||
while (!ss._operation_in_progress.empty()) {
|
||||
if (ss._operation_in_progress != sstring("removenode")) {
|
||||
|
||||
Reference in New Issue
Block a user