You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Chen-Jheng Sing (Jira)" <ji...@apache.org> on 2026/01/08 22:57:00 UTC

[jira] [Assigned] (HDDS-14371) ContainerManagerImpl.getOpenContainerCountPerPipeline could have division by zero

     [ 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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org