You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Ferenc Csaky (Jira)" <ji...@apache.org> on 2024/09/21 06:40:00 UTC
[jira] [Assigned] (FLINK-36342) Rename misleading variable names
[ https://issues.apache.org/jira/browse/FLINK-36342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ferenc Csaky reassigned FLINK-36342:
------------------------------------
Assignee: Xu Hao
> Rename misleading variable names
> --------------------------------
>
> 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
>
> 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)