aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksei Borzenkov <snaury@gmail.com>2022-08-17 12:45:30 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2022-08-17 12:45:30 +0300
commitc6e575078bac331f9aec48caeb0079818362fa9f (patch)
tree48b448910dad61a6690123b066cf2193b33ff366
parent8378a635da3f01abe9b2259130dad2765771e459 (diff)
downloadydb-c6e575078bac331f9aec48caeb0079818362fa9f.tar.gz
22-2: Fix schema snapshots loading after dropping a table, KIKIMR-15583
Merge from trunk: r9868211 REVIEW: 2844947 x-ydb-stable-ref: 9737119ef818e932d99285fe2b9d0a756031e19b
-rw-r--r--ydb/core/tx/datashard/datashard_schema_snapshots.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/ydb/core/tx/datashard/datashard_schema_snapshots.cpp b/ydb/core/tx/datashard/datashard_schema_snapshots.cpp
index c66873db2f..e5f4a97c8e 100644
--- a/ydb/core/tx/datashard/datashard_schema_snapshots.cpp
+++ b/ydb/core/tx/datashard/datashard_schema_snapshots.cpp
@@ -30,7 +30,6 @@ bool TSchemaSnapshotManager::Load(NIceDb::TNiceDb& db) {
return false;
}
- const auto& tables = Self->GetUserTables();
while (!rowset.EndOfSet()) {
const ui64 oid = rowset.GetValue<Schema::SchemaSnapshots::PathOwnerId>();
const ui64 tid = rowset.GetValue<Schema::SchemaSnapshots::LocalPathId>();
@@ -43,13 +42,10 @@ bool TSchemaSnapshotManager::Load(NIceDb::TNiceDb& db) {
const bool ok = ParseFromStringNoSizeLimit(desc, schema);
Y_VERIFY(ok);
- auto it = tables.find(tid);
- Y_VERIFY_S(it != tables.end(), "Cannot find table: " << tid);
-
const auto res = Snapshots.emplace(
std::piecewise_construct,
std::forward_as_tuple(oid, tid, version),
- std::forward_as_tuple(new TUserTable(it->second->LocalTid, desc, 0), step, txId)
+ std::forward_as_tuple(new TUserTable(0, desc, 0), step, txId)
);
Y_VERIFY_S(res.second, "Duplicate schema snapshot: " << res.first->first);