nooneuse commented on code in PR #66307:
URL: https://github.com/apache/doris/pull/66307#discussion_r3850904175
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/MetastoreEventSyncDriver.java:
##########
@@ -310,6 +332,40 @@ private void applyOne(PluginDrivenExternalCatalog catalog,
Connector connector,
}
}
+ private void dropTableConstraintsAndInvalidateMtmvs(TableNameInfo
tableNameInfo) {
+ List<TableNameInfo> affectedTables =
Env.getCurrentEnv().getConstraintManager()
+ .dropTableConstraints(tableNameInfo);
+ MTMVUtil.invalidateRewriteCachesByTableNamesBestEffort(affectedTables,
+ "after applying external table drop event for " +
tableNameInfo);
+ }
+
+ private void dropDatabaseConstraintsAndInvalidateMtmvs(String catalogName,
String dbName) {
+ List<TableNameInfo> affectedTables =
Env.getCurrentEnv().getConstraintManager()
+ .dropDatabaseConstraints(catalogName, dbName);
+ MTMVUtil.invalidateRewriteCachesByTableNamesBestEffort(affectedTables,
+ "after applying external database drop event for " +
catalogName + "." + dbName);
+ }
+
+ private boolean affectsConstraintMetadata(MetastoreChangeDescriptor
descriptor) {
+ switch (descriptor.getOp()) {
+ case REGISTER_DATABASE:
+ case UNREGISTER_DATABASE:
+ case RENAME_DATABASE:
+ case REGISTER_TABLE:
+ case UNREGISTER_TABLE:
+ case RENAME_TABLE:
+ case REFRESH_TABLE:
Review Comment:
okay, i will fix that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]