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 <xemul@scylladb.com>
Signed-off-by: Ran Regev <ran.regev@scylladb.com>
(cherry picked from commit bd3bd089e1)

Closes scylladb/scylladb#24947
This commit is contained in:
Pavel Emelyanov
2025-05-19 09:28:30 +03:00
committed by Botond Dénes
parent f1d4266b7a
commit 71e9f5e662

View File

@@ -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");
}