Attila Doroszlai created HDDS-6418:
--------------------------------------

             Summary: Datanode usage info uses wrong version number
                 Key: HDDS-6418
                 URL: https://issues.apache.org/jira/browse/HDDS-6418
             Project: Apache Ozone
          Issue Type: Bug
          Components: SCM
    Affects Versions: 1.1.0
            Reporter: Attila Doroszlai


{{DatanodeUsageInfo}} passes _datanode_ version 
({{datanodeDetails.getCurrentVersion()}}) to the {{toProto}} method instead of 
_client_ version.

{code:title=https://github.com/apache/ozone/blob/fe6f060d8983462a717f6588dff257f4a6da86c4/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DatanodeUsageInfo.java#L187-L201}
  private HddsProtos.DatanodeUsageInfoProto.Builder toProtoBuilder() {
    HddsProtos.DatanodeUsageInfoProto.Builder builder =
        HddsProtos.DatanodeUsageInfoProto.newBuilder();

    if (datanodeDetails != null) {
      builder.setNode(
          datanodeDetails.toProto(datanodeDetails.getCurrentVersion()));
    }
    if (scmNodeStat != null) {
      builder.setCapacity(scmNodeStat.getCapacity().get());
      builder.setUsed(scmNodeStat.getScmUsed().get());
      builder.setRemaining(scmNodeStat.getRemaining().get());
    }
    return builder;
  }
{code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to