1
0

[HUDI-4311] Fix Flink lose data on some rollback scene (#5950)

This commit is contained in:
吴祥平
2022-06-27 16:09:44 +08:00
committed by GitHub
parent 26c967bac6
commit 3a1fd22841
2 changed files with 1 additions and 3 deletions

View File

@@ -271,7 +271,7 @@ public class StreamWriteOperatorCoordinator
@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);

View File

@@ -97,8 +97,6 @@ public class CkpMetadata implements Serializable {
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) {