azagrebin commented on a change in pull request #12981:
URL: https://github.com/apache/flink/pull/12981#discussion_r460108171



##########
File path: 
flink-core/src/main/java/org/apache/flink/util/JavaGcCleanerWrapper.java
##########
@@ -303,32 +302,38 @@ private Runnable create(Object owner, Runnable 
cleanupOperation) {
        private static class PendingCleanersRunnerProvider {
                private static final String REFERENCE_CLASS = 
"java.lang.ref.Reference";
                private final String cleanerName;
-               private final ReflectionUtils reflectionUtils;
                private final String waitForReferenceProcessingName;
                private final Object[] waitForReferenceProcessingArgs;
                private final Class<?>[] waitForReferenceProcessingArgTypes;
 
                private PendingCleanersRunnerProvider(
                        String cleanerName,
-                       ReflectionUtils reflectionUtils,
                        String waitForReferenceProcessingName,
                        Object[] waitForReferenceProcessingArgs,
                        Class<?>[] waitForReferenceProcessingArgTypes) {
                        this.cleanerName = cleanerName;
-                       this.reflectionUtils = reflectionUtils;
                        this.waitForReferenceProcessingName = 
waitForReferenceProcessingName;
                        this.waitForReferenceProcessingArgs = 
waitForReferenceProcessingArgs;
                        this.waitForReferenceProcessingArgTypes = 
waitForReferenceProcessingArgTypes;
                }
 
+               @Nullable
                private PendingCleanersRunner createPendingCleanersRunner() {

Review comment:
       This is used for one private purpose to consume the result atm, I can do 
it but not sure about benefits of `Optional` here, maybe by later refactoring.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/memory/UnsafeMemoryBudget.java
##########
@@ -37,9 +37,10 @@
 class UnsafeMemoryBudget {
        // max. number of sleeps during try-reserving with exponentially
        // increasing delay before throwing OutOfMemoryError:
-       // 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 (total 1023 ms ~ 1 s)
+       // 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ... (total (2 x 1024) - 1 ms 
~ 2 s)

Review comment:
       true




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