summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnaury <[email protected]>2023-02-20 11:16:32 +0300
committersnaury <[email protected]>2023-02-20 11:16:32 +0300
commitfd76fd1f4ba82dc46fd17a0dc4c9093189aba879 (patch)
treeef6a56c1ef7c68d19c309976be6788d0139ea1b5
parent5ccde54e571dd13c3c37f6ceb1c7613b0b6682ea (diff)
Workaround for missing family settings in schema
-rw-r--r--ydb/core/tablet_flat/flat_executor.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/ydb/core/tablet_flat/flat_executor.cpp b/ydb/core/tablet_flat/flat_executor.cpp
index b02ada11bf7..4934e4658a1 100644
--- a/ydb/core/tablet_flat/flat_executor.cpp
+++ b/ydb/core/tablet_flat/flat_executor.cpp
@@ -4185,7 +4185,14 @@ ui64 TExecutor::BeginCompaction(THolder<NTable::TCompactionParams> params)
for (size_t group : xrange(rowScheme->Families.size())) {
auto familyId = rowScheme->Families[group];
- auto* family = tableInfo->Families.FindPtr(familyId);
+ const auto* family = tableInfo->Families.FindPtr(familyId);
+ if (Y_UNLIKELY(!family)) {
+ // FIXME: workaround for KIKIMR-17222
+ // Column families with default settings may be missing in schema,
+ // so we have to use a static variable as a substitute
+ static const NTable::TScheme::TFamily defaultFamilySettings;
+ family = &defaultFamilySettings;
+ }
Y_VERIFY(family, "Cannot find family %" PRIu32 " in table %" PRIu32, familyId, table);
auto roomId = family->Room;