You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/02 17:22:44 UTC

[GitHub] [flink] DG-Wangtao opened a new pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

DG-Wangtao opened a new pull request #13045:
URL: https://github.com/apache/flink/pull/13045


   
   ## What is the purpose of the change
   
   *This pull request makes checkpoint/savepoint  triggered  immediately if it's not periodic*
   
   
   ## Brief change log
   
     - *Trigger checkpoint/savepoint immediately if it's not periodic*
   
   ## Verifying this change
   
   This change is already covered by existing tests, such as *flink/runtime/checkpoint/CheckpointRequestDeciderTest:testSavepointTiming: nonForcedSavepoint && manualCheckpoint*
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? ( no)
     - If yes, how is the feature documented? (not applicable)
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667703208


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102",
       "triggerID" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 194431a72cad4b8069f29fdd39539b0544fd9d35 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464337365



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -136,6 +136,11 @@
 				.map(unused -> queuedRequests.pollFirst());
 		}
 
+		CheckpointTriggerRequest first = queuedRequests.first();
+		if (first.isForce() || !first.isPeriodic) {

Review comment:
       Hi, @rkhachatryan, thanks for your proposal. As you say, I will make the connection more explicit by inverting the condition and putting onTooEarly inside.
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464349209



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDeciderTest.java
##########
@@ -119,13 +119,13 @@ public void testQueueSizeLimitPriority() {
 	public void testSavepointTiming() {
 		testTiming(regularSavepoint(), TriggerExpectation.IMMEDIATELY);
 		testTiming(periodicSavepoint(), TriggerExpectation.IMMEDIATELY);
-		testTiming(nonForcedSavepoint(), TriggerExpectation.AFTER_PAUSE);
+		testTiming(nonForcedSavepoint(), TriggerExpectation.IMMEDIATELY);

Review comment:
       thanks, I will add a test function reusing `testEnqueueOnTooManyPending` as you say.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667703208


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102",
       "triggerID" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4a4599128c1f8d1432acccfc66c4cd1c8d95ba22",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5132",
       "triggerID" : "4a4599128c1f8d1432acccfc66c4cd1c8d95ba22",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bc1a115c8825526c96674b35effceabc7542d0c2",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5136",
       "triggerID" : "bc1a115c8825526c96674b35effceabc7542d0c2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4a4599128c1f8d1432acccfc66c4cd1c8d95ba22 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5132) 
   * bc1a115c8825526c96674b35effceabc7542d0c2 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5136) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] klion26 commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
klion26 commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464197260



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -136,6 +136,11 @@
 				.map(unused -> queuedRequests.pollFirst());
 		}
 
+		CheckpointTriggerRequest first = queuedRequests.first();

Review comment:
       maybe we can reuse the `first` in `onTooEarly` function

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDeciderTest.java
##########
@@ -119,13 +119,13 @@ public void testQueueSizeLimitPriority() {
 	public void testSavepointTiming() {
 		testTiming(regularSavepoint(), TriggerExpectation.IMMEDIATELY);
 		testTiming(periodicSavepoint(), TriggerExpectation.IMMEDIATELY);
-		testTiming(nonForcedSavepoint(), TriggerExpectation.AFTER_PAUSE);
+		testTiming(nonForcedSavepoint(), TriggerExpectation.IMMEDIATELY);

Review comment:
       after this change, do we need to add a test to guarantee "savepoint and checkpoint would not execute concurrently under unaligned checkpoint mode"




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464287882



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -136,6 +136,11 @@
 				.map(unused -> queuedRequests.pollFirst());
 		}
 
+		CheckpointTriggerRequest first = queuedRequests.first();
+		if (first.isForce() || !first.isPeriodic) {

Review comment:
       Can we make the connection between this check and `onTooEarly` more explicit?
   For example, by inverting this condition and putting `onTooEarly` inside.

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDeciderTest.java
##########
@@ -119,13 +119,13 @@ public void testQueueSizeLimitPriority() {
 	public void testSavepointTiming() {
 		testTiming(regularSavepoint(), TriggerExpectation.IMMEDIATELY);
 		testTiming(periodicSavepoint(), TriggerExpectation.IMMEDIATELY);
-		testTiming(nonForcedSavepoint(), TriggerExpectation.AFTER_PAUSE);
+		testTiming(nonForcedSavepoint(), TriggerExpectation.IMMEDIATELY);

Review comment:
       I think maxPendingCheckpoints limit (what @klion26 proposed) and order are different things to check.
   For the 1st one, I think we can reuse `testEnqueueOnTooManyPending` by calling `nonForcedSavepoint` instead of  `regularCheckpoint`.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -146,15 +151,11 @@
 
 	private Optional<CheckpointTriggerRequest> onTooEarly(long nextTriggerDelayMillis) {
 		CheckpointTriggerRequest first = queuedRequests.first();
-		if (first.isForce()) {
-			return Optional.of(queuedRequests.pollFirst());
-		} else if (first.isPeriodic) {
+		if (first.isPeriodic) {

Review comment:
       Can we inline this function now?
   Otherwise, we need to duplicate the check and return logic (or use preconditions).
   
   Currently, I think `if` is missing `&& !isForce` check,
   and in the end, it should return `pollFirst`.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667778482


   @flinkbot  run azure


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667703208


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102",
       "triggerID" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4a4599128c1f8d1432acccfc66c4cd1c8d95ba22",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5132",
       "triggerID" : "4a4599128c1f8d1432acccfc66c4cd1c8d95ba22",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bc1a115c8825526c96674b35effceabc7542d0c2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "bc1a115c8825526c96674b35effceabc7542d0c2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4a4599128c1f8d1432acccfc66c4cd1c8d95ba22 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5132) 
   * bc1a115c8825526c96674b35effceabc7542d0c2 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464240384



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDeciderTest.java
##########
@@ -119,13 +119,13 @@ public void testQueueSizeLimitPriority() {
 	public void testSavepointTiming() {
 		testTiming(regularSavepoint(), TriggerExpectation.IMMEDIATELY);
 		testTiming(periodicSavepoint(), TriggerExpectation.IMMEDIATELY);
-		testTiming(nonForcedSavepoint(), TriggerExpectation.AFTER_PAUSE);
+		testTiming(nonForcedSavepoint(), TriggerExpectation.IMMEDIATELY);

Review comment:
       Yes, @klion26 , maybe we need this. 
   There are two functions called  `testUserSubmittedPrioritized` and `testSavepointPrioritized` in `CheckpointRequestDeciderTest` for testing the ordering of requests', forced savepoint and checkpoints, and I will write two other test functions for testing the order of unforced savepoints'  and checkpoints' requests , using `testRequestsOrdering` too.
   What do you think about this, @klion26 
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464490003



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -136,6 +136,11 @@
 				.map(unused -> queuedRequests.pollFirst());
 		}
 
+		CheckpointTriggerRequest first = queuedRequests.first();

Review comment:
       Hi, @klion26  @rkhachatryan  I remove `onTooEarly` function and put all statements in `chooseRequestToExecute`.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667703208


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102",
       "triggerID" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 194431a72cad4b8069f29fdd39539b0544fd9d35 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464442182



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -146,15 +151,11 @@
 
 	private Optional<CheckpointTriggerRequest> onTooEarly(long nextTriggerDelayMillis) {
 		CheckpointTriggerRequest first = queuedRequests.first();
-		if (first.isForce()) {
-			return Optional.of(queuedRequests.pollFirst());
-		} else if (first.isPeriodic) {
+		if (first.isPeriodic) {

Review comment:
       Thanks, the table explains very clearly what `chooseRequestToExecute` will return.
   
   
   > I will remove all if from this function.
   
   WDYT about removing the function (`onTooEarly`) at all? (and moving the two remaining statements into `chooseRequestToExecute`)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667703208


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102",
       "triggerID" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4a4599128c1f8d1432acccfc66c4cd1c8d95ba22",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5132",
       "triggerID" : "4a4599128c1f8d1432acccfc66c4cd1c8d95ba22",
       "triggerType" : "PUSH"
     }, {
       "hash" : "bc1a115c8825526c96674b35effceabc7542d0c2",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5136",
       "triggerID" : "bc1a115c8825526c96674b35effceabc7542d0c2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * bc1a115c8825526c96674b35effceabc7542d0c2 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5136) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464343342



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -146,15 +151,11 @@
 
 	private Optional<CheckpointTriggerRequest> onTooEarly(long nextTriggerDelayMillis) {
 		CheckpointTriggerRequest first = queuedRequests.first();
-		if (first.isForce()) {
-			return Optional.of(queuedRequests.pollFirst());
-		} else if (first.isPeriodic) {
+		if (first.isPeriodic) {

Review comment:
       Yes, I will remove all `if` from this function.  The conditions-returnValue map of function `chooseRequestToExecute` would be like this:
   
   |  isForce  | isPeriodic | too eraly | return value of `chooseRequestToExecute` | 
   |  ----  | ----  | ---- | ---- |
   | true  | true | true | pollFirst |
   | true  | true | false | pollFirst |
   | true  | false | true | pollFirst | 
   | true  | false | false | pollFirst | 
   | false  | true | true  | empty,  and call `queuedRequests.pollFirst().completeExceptionally` | 
   | false  | true | false  | pollFirst | 
   | false  | false | true  | pollFirst | 
   | false  | false | false | pollFirst| 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464351124



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDeciderTest.java
##########
@@ -119,13 +119,13 @@ public void testQueueSizeLimitPriority() {
 	public void testSavepointTiming() {
 		testTiming(regularSavepoint(), TriggerExpectation.IMMEDIATELY);
 		testTiming(periodicSavepoint(), TriggerExpectation.IMMEDIATELY);
-		testTiming(nonForcedSavepoint(), TriggerExpectation.AFTER_PAUSE);
+		testTiming(nonForcedSavepoint(), TriggerExpectation.IMMEDIATELY);

Review comment:
       and I want also add two other test functions for testing order, too,  what do you think about this, will they become redundant?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] rkhachatryan commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
rkhachatryan commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464443489



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -136,6 +136,11 @@
 				.map(unused -> queuedRequests.pollFirst());
 		}
 
+		CheckpointTriggerRequest first = queuedRequests.first();
+		if (first.isForce() || !first.isPeriodic) {

Review comment:
       Hi, @DG-Wangtao, thanks!




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667703208


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 194431a72cad4b8069f29fdd39539b0544fd9d35 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667701868


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 194431a72cad4b8069f29fdd39539b0544fd9d35 (Sun Aug 02 17:24:28 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464448854



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -146,15 +151,11 @@
 
 	private Optional<CheckpointTriggerRequest> onTooEarly(long nextTriggerDelayMillis) {
 		CheckpointTriggerRequest first = queuedRequests.first();
-		if (first.isForce()) {
-			return Optional.of(queuedRequests.pollFirst());
-		} else if (first.isPeriodic) {
+		if (first.isPeriodic) {

Review comment:
       I think it's a good idea.  It will make the logic of `chooseRequestToExecute` more clearer.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464232952



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDecider.java
##########
@@ -136,6 +136,11 @@
 				.map(unused -> queuedRequests.pollFirst());
 		}
 
+		CheckpointTriggerRequest first = queuedRequests.first();

Review comment:
       thanks, @klion26 , I will reuse it.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-667703208


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102",
       "triggerID" : "194431a72cad4b8069f29fdd39539b0544fd9d35",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4a4599128c1f8d1432acccfc66c4cd1c8d95ba22",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4a4599128c1f8d1432acccfc66c4cd1c8d95ba22",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 194431a72cad4b8069f29fdd39539b0544fd9d35 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5102) 
   * 4a4599128c1f8d1432acccfc66c4cd1c8d95ba22 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] DG-Wangtao commented on a change in pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
DG-Wangtao commented on a change in pull request #13045:
URL: https://github.com/apache/flink/pull/13045#discussion_r464478544



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointRequestDeciderTest.java
##########
@@ -119,13 +119,13 @@ public void testQueueSizeLimitPriority() {
 	public void testSavepointTiming() {
 		testTiming(regularSavepoint(), TriggerExpectation.IMMEDIATELY);
 		testTiming(periodicSavepoint(), TriggerExpectation.IMMEDIATELY);
-		testTiming(nonForcedSavepoint(), TriggerExpectation.AFTER_PAUSE);
+		testTiming(nonForcedSavepoint(), TriggerExpectation.IMMEDIATELY);

Review comment:
       Hi, @klion26  @rkhachatryan , I add three test functions:
   * testNonForcedEnqueueOnTooManyPending: testing for nonforced savepoint on too many pending
   * testNonForcedUserSubmittedPrioritized: testing for order of nonforced savpoint and nonForcedPeriodicSavepoint
   * testNonForcedSavepointPrioritized: testing for order of nonForcedSavepoint and regularCheckpoint
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] klion26 commented on pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
klion26 commented on pull request #13045:
URL: https://github.com/apache/flink/pull/13045#issuecomment-668383757


   @DG-Wangtao thanks for the work. LGTM from my side.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] pnowojski merged pull request #13045: [FLINK-18748][checkpointing] trigger unperiodic checkpoint immediately

Posted by GitBox <gi...@apache.org>.
pnowojski merged pull request #13045:
URL: https://github.com/apache/flink/pull/13045


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org