You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "waitingF (via GitHub)" <gi...@apache.org> on 2023/05/06 02:31:26 UTC
[GitHub] [hudi] waitingF commented on a diff in pull request #8378: [HUDI-6031] fix bug: checkpoint lost after changing cow to mor
waitingF commented on code in PR #8378:
URL: https://github.com/apache/hudi/pull/8378#discussion_r1186596557
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java:
##########
@@ -320,11 +320,9 @@ public void refreshTimeline() throws IOException {
.build();
switch (meta.getTableType()) {
case COPY_ON_WRITE:
- this.commitTimelineOpt = Option.of(meta.getActiveTimeline().getCommitTimeline().filterCompletedInstants());
- this.allCommitsTimelineOpt = Option.of(meta.getActiveTimeline().getAllCommitsTimeline());
- break;
case MERGE_ON_READ:
- this.commitTimelineOpt = Option.of(meta.getActiveTimeline().getDeltaCommitTimeline().filterCompletedInstants());
+ // we can use getCommitsTimeline for both COW and MOR here, because for COW there is no deltacommit
+ this.commitsTimelineOpt = Option.of(meta.getActiveTimeline().getCommitsTimeline().filterCompletedInstants());
Review Comment:
Yes, that's correct.
In the case of changing COW to MOR, the checkpoint saved in the `.commit` file wrote by COW will be lost when continue with MOR.
--
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