Merge pull request #41169 from ClickHouse/remove-trash-4

Fix strange code in DatabaseReplicated
This commit is contained in:
Alexey Milovidov 2022-09-11 03:30:08 +03:00 committed by GitHub
commit 6f513dab6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -811,7 +811,7 @@ void DatabaseReplicated::recoverLostReplica(const ZooKeeperPtr & current_zookeep
/// Also we have to commit metadata transaction, because it's not committed by default for inner tables of MVs.
/// Yep, I hate inner tables of materialized views.
auto mv_drop_inner_table_context = make_query_context();
table->dropInnerTableIfAny(sync, mv_drop_inner_table_context);
table->dropInnerTableIfAny(/* sync */ true, mv_drop_inner_table_context);
mv_drop_inner_table_context->getZooKeeperMetadataTransaction()->commit();
}