You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2025/12/17 08:51:00 UTC

[jira] [Created] (HDDS-14196) ContainerInfo.fromProtobuf creates two instances

Attila Doroszlai created HDDS-14196:
---------------------------------------

             Summary: 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
            Reporter: Devesh Kumar Singh
            Assignee: Devesh Kumar Singh


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