[
https://issues.apache.org/jira/browse/HDDS-12565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937313#comment-17937313
]
Siddhant Sangwan commented on HDDS-12565:
-----------------------------------------
Looks like https://github.com/apache/ozone/pull/8086 already made this change
two days ago! Closing this jira.
> Treat volumeFreeSpaceToSpare as reserved space
> ----------------------------------------------
>
> Key: HDDS-12565
> URL: https://issues.apache.org/jira/browse/HDDS-12565
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Sammi Chen
> Assignee: Peter Lee
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.1.0
>
>
> VolumeUsage#hasVolumeEnoughSpace should treat volumeFreeSpaceToSpare as
> reserved space
> Currently it's allowed to allocate space from volumeFreeSpaceToSpare.
> {code:java}
> public static boolean hasVolumeEnoughSpace(long volumeAvailableSpace,
> long volumeCommittedBytesCount,
> long requiredSpace,
> long volumeFreeSpaceToSpare) {
> return (volumeAvailableSpace - volumeCommittedBytesCount) >
> Math.max(requiredSpace, volumeFreeSpaceToSpare);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]