[
https://issues.apache.org/jira/browse/HDDS-14196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-14196:
----------------------------------
Labels: pull-request-available (was: )
> ContainerInfo.fromProtobuf creates two instances
> ------------------------------------------------
>
> Key: HDDS-14196
> URL: https://issues.apache.org/jira/browse/HDDS-14196
> Project: Apache Ozone
> Issue Type: Bug
> Components: common
> Affects Versions: 1.1.0
> Reporter: Devesh Kumar Singh
> Assignee: Devesh Kumar Singh
> Priority: Major
> Labels: pull-request-available
>
> {{ContainerInfo#fromProtobuf}} creates a throwaway instance in addition to
> the one being returned.
> {code:title=https://github.com/apache/ozone/blob/2029b59898a737a9c5d4a1ee54195fa16e7ed369/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/container/ContainerInfo.java#L109-L127}
> ContainerInfo.Builder builder = new ContainerInfo.Builder();
> ...
> builder.setUsedBytes(info.getUsedBytes())
> ...
> .setSequenceId(info.getSequenceId())
> .build();
> if (info.hasPipelineID()) {
> builder.setPipelineID(PipelineID.getFromProtobuf(info.getPipelineID()));
> }
> return builder.build();
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]