ChenSammi commented on code in PR #8090:
URL: https://github.com/apache/ozone/pull/8090#discussion_r2006813037
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/CapacityVolumeChoosingPolicy.java:
##########
@@ -46,9 +46,8 @@ public class CapacityVolumeChoosingPolicy implements
VolumeChoosingPolicy {
// Stores the index of the next volume to be returned.
private final Random random = new Random();
-
@Override
- public HddsVolume chooseVolume(List<HddsVolume> volumes,
+ public synchronized HddsVolume chooseVolume(List<HddsVolume> volumes,
Review Comment:
Before return the selected volume, add the maxContainerSize to the
committedBytes of volume to reserve the space. Also, we need to check the
caller of chooseVolume, caller doesn't need to reserve the space again.
--
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]