uce closed pull request #7006: [FLINK-10751] [runtime] Retain checkpoints on 
suspension
URL: https://github.com/apache/flink/pull/7006
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointProperties.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointProperties.java
index 07780c201dc..27279523cdd 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointProperties.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointProperties.java
@@ -246,7 +246,7 @@ public String toString() {
                        true,  // Delete on success
                        true,  // Delete on cancellation
                        true,  // Delete on failure
-                       true); // Delete on suspension
+                       false); // Retain on suspension
 
        private static final CheckpointProperties 
CHECKPOINT_RETAINED_ON_FAILURE = new CheckpointProperties(
                        false,
@@ -255,7 +255,7 @@ public String toString() {
                        true,  // Delete on success
                        true,  // Delete on cancellation
                        false, // Retain on failure
-                       true); // Delete on suspension
+                       false); // Retain on suspension
 
        private static final CheckpointProperties 
CHECKPOINT_RETAINED_ON_CANCELLATION = new CheckpointProperties(
                        false,
@@ -266,7 +266,6 @@ public String toString() {
                        false,  // Retain on failure
                        false); // Retain on suspension
 
-
        /**
         * Creates the checkpoint properties for a (manually triggered) 
savepoint.
         *
diff --git 
a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointPropertiesTest.java
 
b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointPropertiesTest.java
index c17172b68dc..255904ea953 100644
--- 
a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointPropertiesTest.java
+++ 
b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointPropertiesTest.java
@@ -42,7 +42,7 @@ public void testCheckpointProperties() {
                assertTrue(props.discardOnJobFinished());
                assertTrue(props.discardOnJobCancelled());
                assertFalse(props.discardOnJobFailed());
-               assertTrue(props.discardOnJobSuspended());
+               assertFalse(props.discardOnJobSuspended());
 
                props = 
CheckpointProperties.forCheckpoint(CheckpointRetentionPolicy.RETAIN_ON_CANCELLATION);
 
diff --git 
a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/StandaloneCompletedCheckpointStoreTest.java
 
b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/StandaloneCompletedCheckpointStoreTest.java
index 6f3c60b5fce..4bb5c291b34 100644
--- 
a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/StandaloneCompletedCheckpointStoreTest.java
+++ 
b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/StandaloneCompletedCheckpointStoreTest.java
@@ -83,8 +83,7 @@ public void testSuspendDiscardsCheckpoints() throws Exception 
{
 
                store.shutdown(JobStatus.SUSPENDED);
                assertEquals(0, store.getNumberOfRetainedCheckpoints());
-               assertTrue(checkpoint.isDiscarded());
-               verifyCheckpointDiscarded(taskStates);
+               assertFalse(checkpoint.isDiscarded());
        }
        
        /**


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to