morningman commented on code in PR #11656: URL: https://github.com/apache/doris/pull/11656#discussion_r943043734
########## fe/fe-core/src/main/java/org/apache/doris/persist/OperationType.java: ########## @@ -234,8 +237,11 @@ public class OperationType { public static final short OP_ALTER_DS_NAME = 314; public static final short OP_ALTER_DS_PROPS = 315; public static final short OP_ALTER_STORAGE_POLICY = 316; + public static final short OP_REFRESH_DS = 317; Review Comment: ```suggestion public static final short OP_REFRESH_CATALOG = 317; ``` ########## fe/fe-core/src/main/java/org/apache/doris/datasource/DataSourceMgr.java: ########## @@ -95,6 +96,20 @@ private DataSourceIf removeCatalog(long catalogId) { return catalog; } + private void unprotectedRefreshCatalog(long catalogId) { + DataSourceIf catalog = idToCatalog.get(catalogId); + if (catalog != null) { + String catalogName = catalog.getName(); + if (!catalogName.equals(InternalDataSource.INTERNAL_DS_NAME)) { + ((ExternalDataSource) catalog).setInitialized(false); + } + catalog = nameToCatalog.get(catalogName); + ((ExternalDataSource) catalog).setInitialized(false); Review Comment: The catalog save in `idToCatalog` and `nameToCatalog` is same object instance. So no need to set them twice. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org