Skip to content

Commit

Permalink
[HUDI-4311] Fix Flink lose data on some rollback scene (apache#5950)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3a1fd22)
  • Loading branch information
wxplovecc authored and danny0405 committed Jul 22, 2022
1 parent 451a14e commit 96330b1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public void notifyCheckpointComplete(long checkpointId) {

@Override
public void notifyCheckpointAborted(long checkpointId) {
if (checkpointId == this.checkpointId) {
if (checkpointId == this.checkpointId && !WriteMetadataEvent.BOOTSTRAP_INSTANT.equals(this.instant)) {
executor.execute(() -> {
this.ckpMetadata.abortInstant(this.instant);
}, "abort instant %s", this.instant);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ public void close() {
public void bootstrap(HoodieTableMetaClient metaClient) throws IOException {
fs.delete(path, true);
fs.mkdirs(path);
metaClient.getActiveTimeline().getCommitsTimeline().filterPendingExcludingCompaction()
.lastInstant().ifPresent(instant -> startInstant(instant.getTimestamp()));
}

public void startInstant(String instant) {
Expand Down

0 comments on commit 96330b1

Please sign in to comment.