[
https://issues.apache.org/jira/browse/HDDS-15280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18130494#comment-18130494
]
Siyao Meng commented on HDDS-15280:
-----------------------------------
[Jira cleanup 2026-10-22] Resolving as Fixed. The fractional factor is
multiplied before the final cast, as requested.
Evidence:
* https://github.com/apache/ozone/pull/10272
*
https://github.com/apache/ozone/commit/003b26a27f4240674d02ce3ebbd7a772426d2c5d
*
https://github.com/apache/ozone/blob/bf3829e6c8ac69ae17585585703f91426dcdf6b3/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/WritableECContainerProvider.java#L190
Feel free to reopen if further work is needed.
> Fix EC pipeline factor calculation
> ----------------------------------
>
> Key: HDDS-15280
> URL: https://issues.apache.org/jira/browse/HDDS-15280
> Project: Apache Ozone
> Issue Type: Bug
> Components: ECOfflineRecovery
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Major
> Labels: pull-request-available
>
> WritableECContainerProvider uses ozone.scm.ec.pipeline.per.volume.factor to
> calculate the maximum number of EC pipelines based on the total number of
> healthy volumes.
> Currently, the calculation casts the factor to int before multiplying it by
> the volume count:
> (int) factor * volumes / repConfig.getRequiredNodes()
> This causes fractional values to be truncated before the calculation. For
> example, when the factor is configured as 0.5, it becomes 0, so the
> volume-based pipeline count is calculated as 0 regardless of the number of
> healthy volumes.
> As a result, fractional values for ozone.scm.ec.pipeline.per.volume.factor do
> not work as intended, and the provider may fall back to the minimum pipeline
> count instead of honoring the configured factor.
> The calculation should apply the factor before casting the final result to
> int:
> (int) (factor * volumes / repConfig.getRequiredNodes())
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]