From 491db28fbf759d447f24961115600f98524c4015 Mon Sep 17 00:00:00 2001 From: Aleksandra Martyniuk Date: Wed, 27 May 2026 14:35:18 +0200 Subject: [PATCH] tablets: fall back to full partition read when tablet map is missing When update_tablet_metadata receives a hint with non-empty tokens for a table whose tablet map doesn't exist locally yet, it would call mutate_tablet_map_async which throws no_such_tablet_map. This happens during bootstrap when the joining node receives tablet metadata for a table it has never seen before. Fix by checking has_tablet_map() before attempting the point update. If the map is missing, fall back to do_update_tablet_metadata_partition which reads the full partition from system.tablets and creates the map. --- replica/tablets.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replica/tablets.cc b/replica/tablets.cc index 00374344c3..9787da1ab7 100644 --- a/replica/tablets.cc +++ b/replica/tablets.cc @@ -1062,7 +1062,7 @@ future<> update_tablet_metadata(replica::database& db, cql3::query_processor& qp try { for (const auto& [_, table_hint] : hint.tables) { - if (table_hint.full_read || table_hint.tokens.empty()) { + if (table_hint.full_read || table_hint.tokens.empty() || !tm.has_tablet_map(table_hint.table_id)) { co_await do_update_tablet_metadata_partition(qp, tm, table_hint, builder); } else { co_await tm.mutate_tablet_map_async(table_hint.table_id, [&] (tablet_map& tmap) -> future<> {