[
https://issues.apache.org/jira/browse/HDDS-14371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-14371:
----------------------------------
Labels: pull-request-available (was: )
> ContainerManagerImpl.getOpenContainerCountPerPipeline could have division by
> zero
> ---------------------------------------------------------------------------------
>
> Key: HDDS-14371
> URL: https://issues.apache.org/jira/browse/HDDS-14371
> Project: Apache Ozone
> Issue Type: Bug
> Components: SCM
> Reporter: Tsz-wo Sze
> Assignee: Chen-Jheng Sing
> Priority: Major
> Labels: pull-request-available
>
> {code}
> //ContainerManagerImpl
> private int getOpenContainerCountPerPipeline(Pipeline pipeline) {
> int minContainerCountPerDn = numContainerPerVolume *
> pipelineManager.minHealthyVolumeNum(pipeline);
> int minPipelineCountPerDn = pipelineManager.minPipelineLimit(pipeline);
> return (int) Math.ceil(
> ((double) minContainerCountPerDn / minPipelineCountPerDn));
> }
> {code}
> - Division-by-zero bug: The value of minPipelineCountPerDn above could be
> zero since SCMNodeManager.minPipelineLimit(..) could return zero.
> - Another minor performance problem: the minPipelineLimit(..) and
> minHealthyVolumeNum(..) methods in SCMNodeManager should not create a list
> for computing min.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]