rkhachatryan commented on a change in pull request #13040:
URL: https://github.com/apache/flink/pull/13040#discussion_r470526276



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/PendingCheckpoint.java
##########
@@ -519,24 +522,8 @@ private void dispose(boolean releaseState) {
                        try {
                                numAcknowledgedTasks = -1;
                                if (!discarded && releaseState) {
-                                       executor.execute(new Runnable() {
-                                               @Override
-                                               public void run() {
-
-                                                       // discard the private 
states.
-                                                       // unregistered shared 
states are still considered private at this point.
-                                                       try {
-                                                               
StateUtil.bestEffortDiscardAllStateObjects(operatorStates.values());
-                                                               
targetLocation.disposeOnFailure();
-                                                       } catch (Throwable t) {
-                                                               LOG.warn("Could 
not properly dispose the private states in the pending checkpoint {} of job 
{}.",
-                                                                       
checkpointId, jobId, t);
-                                                       } finally {
-                                                               
operatorStates.clear();
-                                                       }
-                                               }
-                                       });
-
+                                       
checkpointsCleaner.asyncDiscardPrivateStatesAndCountCheckpoints(operatorStates,

Review comment:
       I missed that in the previous version it also was asynchronous, so 
synchronization is fine. Sorry for confusion.




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


Reply via email to