[
https://issues.apache.org/jira/browse/FLINK-36342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xu Hao updated FLINK-36342:
---------------------------
Description:
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, 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.
was:
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.
> 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
> 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, 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)