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

Chen-Jheng Sing reassigned HDDS-14371:
--------------------------------------

    Assignee: Chen-Jheng Sing

> 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
>
> {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: SCMNodeManager.minPipelineLimit(..) 
> 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]

Reply via email to