[ 
https://issues.apache.org/jira/browse/FLINK-36342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ferenc Csaky updated FLINK-36342:
---------------------------------
    Summary: Rename misleading BufferDebloater variable 'targetTotalBufferSize' 
 (was: Rename misleading variable names)

> Rename misleading BufferDebloater variable 'targetTotalBufferSize'
> ------------------------------------------------------------------
>
>                 Key: FLINK-36342
>                 URL: https://issues.apache.org/jira/browse/FLINK-36342
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Checkpointing
>            Reporter: Xu Hao
>            Assignee: Xu Hao
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 2.0-preview
>
>
> The variable named targetTotalBufferSize appears in class 
> BufferDebloatConfiguration and some other classes has been incorrectly named. 
> Based on the context and the origin of this variable, it is clearly a 
> *Duration* type variable that is read from configuration(the key is
> *taskmanager.network.memory.buffer-debloat.target* and default value is 1s). 
> So a more suitable name might be targetTotalTime.
> This variable is used to calculate buffer size(see 
> BufferDebloater#recalculateBufferSize), the specific code is as follows: 
> long desiredTotalBufferSizeInBytes = (currentThroughput * 
> targetTotalBufferSize) / MILLIS_IN_SECOND; 
> If the variable name is not corrected, maintainers might find it is quite 
> difficult to understand why the current throughput is multiplied by the 
> target buffer size to calculate the total buffer size.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to