From 71e9f5e662b0416b2615f4a4e3ac7670ec14052d Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Mon, 19 May 2025 09:28:30 +0300 Subject: [PATCH] sstables_loader: Fix load-and-stream vs skip-cleanup check The intention was to fail the REST API call in case --skip-cleanup is requested for --load-and-stream loading. The corresponding if expression is checking something else :( despite log message is correct. Fixes: https://github.com/scylladb/scylladb/issues/24913 Signed-off-by: Pavel Emelyanov Signed-off-by: Ran Regev (cherry picked from commit bd3bd089e1754f95b37bdfb05681bf1376aca746) Closes scylladb/scylladb#24947 --- sstables_loader.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sstables_loader.cc b/sstables_loader.cc index a7cc769da1..b5dcfba05c 100644 --- a/sstables_loader.cc +++ b/sstables_loader.cc @@ -548,7 +548,7 @@ future<> sstables_loader::load_new_sstables(sstring ks_name, sstring cf_name, throw std::runtime_error("Skipping reshape is not possible when doing load-and-stream"); } - if (!load_and_stream && skip_cleanup) { + if (load_and_stream && skip_cleanup) { throw std::runtime_error("Skipping cleanup is not possible when doing load-and-stream"); }