peterxcli commented on code in PR #8090:
URL: https://github.com/apache/ozone/pull/8090#discussion_r2001854682


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/CapacityVolumeChoosingPolicy.java:
##########
@@ -44,9 +44,6 @@ public class CapacityVolumeChoosingPolicy implements 
VolumeChoosingPolicy {
   public static final Logger LOG = LoggerFactory.getLogger(
       CapacityVolumeChoosingPolicy.class);
 
-  // Stores the index of the next volume to be returned.
-  private final Random random = new Random();

Review Comment:
   I just remembered that the original reason for this change was simply to 
avoid lock contention with the Random object. And I've just learned that Random 
provides a predefined sequence of 'pseudorandom' numbers in Java.
   
   Now I understand the meaning of the deleted comment(which I think it is just 
a leftover). Thanks, @adoroszlai.



-- 
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