mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
compaction/scrub: handle exceptions when moving invalid sstables to quarantine
In validate mode, scrub moves invalid sstables into the quarantine folder. If validation fails because the sstable files are missing from disk, there is nothing to move, and the quarantine step will throw an exception. Handle such exceptions so scrub can return a proper compaction_result instead of propagating the exception to the caller. This will help the testcase for #23363 to reliably determine if the scrub has failed or not. Signed-off-by: Lakshmi Narayanan Sreethar <lakshmi.sreethar@scylladb.com>
This commit is contained in:
@@ -2006,7 +2006,11 @@ static future<compaction_result> scrub_sstables_validate_mode(sstables::compacti
|
||||
using scrub = sstables::compaction_type_options::scrub;
|
||||
if (validation_errors != 0 && descriptor.options.as<scrub>().quarantine_sstables == scrub::quarantine_invalid_sstables::yes) {
|
||||
for (auto& sst : descriptor.sstables) {
|
||||
co_await sst->change_state(sstables::sstable_state::quarantine);
|
||||
try {
|
||||
co_await sst->change_state(sstables::sstable_state::quarantine);
|
||||
} catch (...) {
|
||||
clogger.error("Moving {} to quarantine failed due to {}, continuing.", sst->get_filename(), std::current_exception());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user