pnowojski commented on a change in pull request #10332: 
[FLINK-13905][checkpointing] Separate checkpoint triggering into several 
asynchronous stages
URL: https://github.com/apache/flink/pull/10332#discussion_r364201010
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
 ##########
 @@ -969,25 +969,25 @@ private void dropSubsumedCheckpoints(long checkpointId) {
        }
 
        /**
-        * Triggers the queued request, if there is one.
+        * Resumes suspended periodic triggering.
         *
         * <p>NOTE: The caller of this method must hold the lock when invoking 
the method!
         */
-       private void triggerQueuedRequests() {
-               if (triggerRequestQueued) {
-                       triggerRequestQueued = false;
+       private void resumePeriodicTriggering() {
+               assert(Thread.holdsLock(lock));
+
+               if (shutdown || !periodicScheduling) {
+                       return;
+               }
+               if (periodicTriggeringSuspended) {
+                       periodicTriggeringSuspended = false;
 
                        // trigger the checkpoint from the trigger timer, to 
finish the work of this thread before
                        // starting with the next checkpoint
-                       if (periodicScheduling) {
-                               if (currentPeriodicTrigger != null) {
-                                       currentPeriodicTrigger.cancel(false);
-                               }
-                               currentPeriodicTrigger = 
scheduleTriggerWithDelay(0L);
-                       }
-                       else {
-                               timer.execute(new ScheduledTrigger());
 
 Review comment:
   As far as I can see, `periodicScheduling == false` happens for example 
during shutting down the `CheckpointCoordinator`. There are some cases, like 
for example in stop with savepoint 
`org.apache.flink.runtime.scheduler.SchedulerBase#triggerSavepoint`, where 
`CheckpointCordinator#stopCheckpointScheduler` can be called, and if savepoint 
fails, `CheckpointCoordinator` is restarted via 
`CheckpointCoordinator#startCheckpointScheduler`.
   
   Can this missing `timer.execute(new ScheduledTrigger());` case somehow 
interplay with stop with savepoints?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to