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



##########
File path: 
flink-dstl/flink-dstl-dfs/src/main/java/org/apache/flink/changelog/fs/BatchingStateChangeUploader.java
##########
@@ -206,16 +251,27 @@ private synchronized void setErrorSafe(Throwable t) {
     }
 
     private static UploadTask wrapWithSizeUpdate(
-            UploadTask uploadTask, long preComputedTaskSize, LongAdder 
inflightSize) {
+            UploadTask uploadTask, Runnable releaseCapacityCallback) {
         return new UploadTask(
                 uploadTask.changeSets,
                 result -> {
-                    inflightSize.add(-preComputedTaskSize);
-                    uploadTask.successCallback.accept(result);
+                    try {
+                        releaseCapacityCallback.run();

Review comment:
       My intention was to make it clear what is captured in terms of 
references at runtime;
   but apparrently it doesn't make it more clear, so I'll change back to a 
direct call and make `wrapWithSizeUpdate` non-static.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to