[ 
https://issues.apache.org/jira/browse/FLINK-9159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16563550#comment-16563550
 ] 

ASF GitHub Bot commented on FLINK-9159:
---------------------------------------

tillrohrmann commented on a change in pull request #6406: [FLINK-9159][runtime] 
Sanity check default timeout values
URL: https://github.com/apache/flink/pull/6406#discussion_r206500540
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerConfiguration.java
 ##########
 @@ -68,11 +74,24 @@ public static SlotManagerConfiguration 
fromConfiguration(Configuration configura
                                "value " + AkkaOptions.ASK_TIMEOUT + '.', e);
                }
 
-               final Time slotRequestTimeout = Time.milliseconds(
-                               
configuration.getLong(ResourceManagerOptions.SLOT_REQUEST_TIMEOUT));
+               final Time slotRequestTimeout = 
getSlotRequestTimeout(configuration);
                final Time taskManagerTimeout = Time.milliseconds(
                                
configuration.getLong(ResourceManagerOptions.TASK_MANAGER_TIMEOUT));
 
                return new SlotManagerConfiguration(rpcTimeout, 
slotRequestTimeout, taskManagerTimeout);
        }
+
+       private static Time getSlotRequestTimeout(final Configuration 
configuration) {
+               final long legacySlotRequestTimeoutMs = 
configuration.getLong(ResourceManagerOptions.SLOT_REQUEST_TIMEOUT);
+               final long slotRequestTimeoutMs;
+               if (legacySlotRequestTimeoutMs == 
ResourceManagerOptions.SLOT_REQUEST_TIMEOUT.defaultValue()) {
 
 Review comment:
   I think 
`configuration.contains(ResourceManagerOptions.SLOT_REQUEST_TIMEOUT)` would be 
more accurate because one could set this option accidentally to the default 
value.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Sanity check default timeout values
> -----------------------------------
>
>                 Key: FLINK-9159
>                 URL: https://issues.apache.org/jira/browse/FLINK-9159
>             Project: Flink
>          Issue Type: Bug
>          Components: Distributed Coordination
>    Affects Versions: 1.5.0
>            Reporter: Till Rohrmann
>            Assignee: Gary Yao
>            Priority: Blocker
>              Labels: flip-6, pull-request-available
>             Fix For: 1.5.3, 1.6.0
>
>
> Check that the default timeout values for resource release are sanely chosen.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to