Skip to content

Commit

Permalink
[FLINK-28898][state/changelog] Fix unstable ChangelogRecoverySwitchSt…
Browse files Browse the repository at this point in the history
…ateBackendITCase#testSwitchFromEnablingToDisablingWithRescalingOut
  • Loading branch information
masteryhx authored and rkhachatryan committed Aug 10, 2022
1 parent 465db25 commit 3268ec6
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import org.apache.flink.testutils.junit.SharedObjects;
import org.apache.flink.util.AbstractID;
import org.apache.flink.util.Collector;
import org.apache.flink.util.ExceptionUtils;
import org.apache.flink.util.TestLogger;

import org.junit.After;
Expand Down Expand Up @@ -231,9 +232,14 @@ public static Set<StateHandleID> getAllStateHandleId(JobID jobID, MiniCluster mi
CheckpointMetadata checkpointMetadata;
try {
checkpointMetadata = loadCheckpointMetadata(mostRecentCompletedCheckpointPath.get());
} catch (FileNotFoundException fileNotFoundException) {
// return empty result when the metadata file do not exist due to subsumed checkpoint.
return Collections.emptySet();
} catch (IOException ioException) {
if (ExceptionUtils.findThrowable(ioException, FileNotFoundException.class)
.isPresent()) {
// return empty result when the metadata file do not exist due to subsumed
// checkpoint.
return Collections.emptySet();
}
throw ioException;
}

Set<StateHandleID> materializationIds =
Expand Down

0 comments on commit 3268ec6

Please sign in to comment.