rnblough opened a new pull request, #10580:
URL: https://github.com/apache/ozone/pull/10580

   ## What changes were proposed in this pull request?
   
   The javadoc comments in ContainerInfo.java describes the usedBytes values 
being the opposite of the implementation in 
AbstractContainerReportHandler.java. This is literal and exact - 
ContainerInfo.java reports the maximum of values listed over OPEN container 
replicas and minimum of values over CLOSED container replicas; 
AbstractContainerReportHandler implements the opposite relationship in the 
actual values reported:
   
     if (containerInfo.getState().equals(HddsProtos.LifeCycleState.OPEN)) {
       // Open containers are generally growing in key count and size, the
       // overall size should be the min of all reported replicas.
       return Math.min(lastValue, thisValue);
     } else {
       // Containers which are not open can only shrink in size, so use the
       // largest values reported.
       return Math.max(lastValue, thisValue);
     }
     
   The fix is trivial - I switched the swapped the words 'minimum' and 
'maximum' in ContainerInfo.java in order to have the description match the 
implementation.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15529
   
   ## How was this patch tested?
   
   Default branch build. Corrected a comment section, no operational impact.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to