You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "stream2000 (via GitHub)" <gi...@apache.org> on 2023/06/02 01:56:55 UTC
[GitHub] [hudi] stream2000 commented on a diff in pull request #8745: [HUDI-6182] Hive sync use state transient time to avoid losing partit…
stream2000 commented on code in PR #8745:
URL: https://github.com/apache/hudi/pull/8745#discussion_r1213840107
##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java:
##########
@@ -298,6 +298,22 @@ protected void syncHoodieTable(String tableName, boolean useRealtimeInputFormat,
LOG.info("Sync complete for " + tableName);
}
+ private boolean needToSyncAllPartitions(Option<String> lastCommitTimeSynced) {
+ if (!lastCommitTimeSynced.isPresent()) {
+ return true;
+ }
+ if (config.getBoolean(META_SYNC_USE_STATE_TRANSIENT_TIME)) {
+ // If we use state transient time to sync partitions and the last commit time synced is before latest archive time
+ // We need to fall back to list all partitions instead of load the whole archive timeline
+ Option<String> latestArchiveTime = syncClient.getLastArchiveTime();
Review Comment:
Maybe we need to scan some archive logs here, at least those created after `lastCommitTimeSynced`. Otherwise, we need to sync all partitions every time we do the archive.
--
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-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org