[
https://issues.apache.org/jira/browse/HDDS-4054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai resolved HDDS-4054.
------------------------------------
Resolution: Won't Fix
> Remove duplicate judgments in allocateBlockInKey
> ------------------------------------------------
>
> Key: HDDS-4054
> URL: https://issues.apache.org/jira/browse/HDDS-4054
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: mingchao zhao
> Assignee: mingchao zhao
> Priority: Major
> Labels: pull-request-available
>
> In HDDS-1666 we have [changed the size of the key
> size|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R439].
> So this size must be >0.
> {code:java}
> final long size = args.getDataSize() > 0 ?
> args.getDataSize() : scmBlockSize;
> {code}
> We [pass this size when we call
> allocateBlockInKey|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R480].
> The key must be greater than 0, so the "if (size > 0){}" in
> allocateBlockInKey is redundant and should be removed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]