From 2caef424fe0ffdc2bc9539569bf595620fbf244d Mon Sep 17 00:00:00 2001 From: Aleksandra Martyniuk Date: Thu, 8 Feb 2024 13:45:48 +0100 Subject: [PATCH] repair: handle no_such_column_family from remote node gracefully If no_such_column_family is thrown on remote node, then repair operation fails as the type of exception cannot be determined. Use repair::with_table_drop_silenced in repair to continue operation if a table was dropped. (cherry picked from commit cf3601559125587f1b2830dc491d7778aee9c4d8) --- repair/repair.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/repair/repair.cc b/repair/repair.cc index 720da0081b..82b685ced2 100644 --- a/repair/repair.cc +++ b/repair/repair.cc @@ -16,6 +16,7 @@ #include "utils/fb_utilities.hh" #include "gms/gossiper.hh" #include "message/messaging_service.hh" +#include "repair/table_check.hh" #include "sstables/sstables.hh" #include "replica/database.hh" #include "db/config.hh" @@ -696,9 +697,12 @@ future<> repair::shard_repair_task_impl::repair_range(const dht::token_range& ra co_return; } try { - co_await repair_cf_range_row_level(*this, cf, table.id, range, neighbors); - } catch (replica::no_such_column_family&) { - dropped_tables.insert(cf); + auto dropped = co_await with_table_drop_silenced(db.local(), mm, table.id, [&] (const table_id& uuid) { + return repair_cf_range_row_level(*this, cf, table.id, range, neighbors); + }); + if (dropped) { + dropped_tables.insert(cf); + } } catch (...) { nr_failed_ranges++; throw;