morningman commented on code in PR #39239: URL: https://github.com/apache/doris/pull/39239#discussion_r1720572896
########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalCatalog.java: ########## @@ -101,6 +106,12 @@ public void checkProperties() throws DdlException { "The parameter " + FILE_META_CACHE_TTL_SECOND + " is wrong, value is " + fileMetaCacheTtlSecond); } + enableHmsEventsIncrementalSync = + catalogProperty.getOrDefault(HMSProperties.ENABLE_HMS_EVENTS_INCREMENTAL_SYNC, "false").equals("true"); + + hmsEventsBatchSizePerRpc = + Integer.valueOf(catalogProperty.getOrDefault(HMSProperties.HMS_EVENTIS_BATCH_SIZE_PER_RPC, "-1")); Review Comment: what is -1 mean? ########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalCatalog.java: ########## @@ -101,6 +106,12 @@ public void checkProperties() throws DdlException { "The parameter " + FILE_META_CACHE_TTL_SECOND + " is wrong, value is " + fileMetaCacheTtlSecond); } + enableHmsEventsIncrementalSync = + catalogProperty.getOrDefault(HMSProperties.ENABLE_HMS_EVENTS_INCREMENTAL_SYNC, "false").equals("true"); Review Comment: The default value should be `Config.enable_hms_events_incremental_sync` ########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/AlterPartitionEvent.java: ########## @@ -145,9 +145,7 @@ protected boolean canBeBatched(MetastoreEvent that) { // `that` event can be batched if this event's partitions contains all of the partitions which `that` event has // else just remove `that` event's relevant partitions for (String partitionName : getAllPartitionNames()) { - if (thatPartitionEvent instanceof AddPartitionEvent) { - ((AddPartitionEvent) thatPartitionEvent).removePartition(partitionName); - } else if (thatPartitionEvent instanceof DropPartitionEvent) { + if (thatPartitionEvent instanceof DropPartitionEvent) { Review Comment: Why removing addPartition? ########## fe/fe-core/src/main/java/org/apache/doris/datasource/hive/event/MetastoreEventsProcessor.java: ########## @@ -125,6 +128,8 @@ private void realRun() { } catch (MetastoreNotificationFetchException e) { LOG.warn("Failed to fetch hms events on {}. msg: ", hmsExternalCatalog.getName(), e); } catch (Exception ex) { + hmsExternalCatalog.onRefresh(true); Review Comment: What is this 2 lines for? -- 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