Browse Source

KIKIMR-20422: Remove schema versions

nsofya 1 year ago
parent
commit
ecea7143ac
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ydb/core/tx/columnshard/tables_manager.cpp

+ 5 - 0
ydb/core/tx/columnshard/tables_manager.cpp

@@ -317,6 +317,11 @@ bool TTablesManager::TryFinalizeDropPath(NTabletFlatExecutor::TTransactionContex
     PathsToDrop.erase(itDrop);
     NIceDb::TNiceDb db(txc.DB);
     NColumnShard::Schema::EraseTableInfo(db, pathId);
+    const auto& table = Tables.find(pathId);
+    Y_ABORT_UNLESS(table != Tables.end(), "No schema for path %lu", pathId); 
+    for (auto&& tableVersion : table->second.GetVersions()) {
+        NColumnShard::Schema::EraseTableVersionInfo(db, pathId, tableVersion.first);
+    }
     return true;
 }