[ 
https://issues.apache.org/jira/browse/HDDS-12556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934327#comment-17934327
 ] 

Ethan Rose commented on HDDS-12556:
-----------------------------------

One possible implementation is that {{VolumeChoosingPolicy#chooseVolume}} 
returns an {{AutoCloseable}} implementation with the requested space already 
reserved in allocated bytes. Closing the handle would release the space back to 
the volume. Used bytes in the volume would need to be incremented separately 
based on the result of the operation.

> Use closable handle to allocate and release committed bytes
> -----------------------------------------------------------
>
>                 Key: HDDS-12556
>                 URL: https://issues.apache.org/jira/browse/HDDS-12556
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Ethan Rose
>            Priority: Major
>
> Use a closable handle to allocate and release committed bytes from datanode 
> volume usage while doing an operation. The current code requires manually 
> incrementing and decrementing an allocated bytes counter. This would be 
> useful in multiple places like container import, create, volume scan (for 
> temp check file), and our current export flow which requires dumping SST 
> files.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to