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

Yiqun Lin commented on HDDS-4565:
---------------------------------

Hi [~rakeshr], as I know the Ozone volume/bucket also use the way to maintain 
byteUsed and update this for each bucket/key create or delete. But seems it 
could still be an expensive call, for example if we have a very deep directory, 
and then we delete one children file and its all ancestor dir should update 
their bytesUsed. 

 
{quote}
This would be the simplest approach rather than iterating over all the subpaths 
or maintain extra info at dir level.
{quote}
I am thinking the async way, we still need to do the paths iterating, right? 
Why here we say we will not do this iterating.

> Delete : quotaReleased on directory deletion should consider all sub paths
> --------------------------------------------------------------------------
>
>                 Key: HDDS-4565
>                 URL: https://issues.apache.org/jira/browse/HDDS-4565
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Rakesh Radhakrishnan
>            Assignee: Rakesh Radhakrishnan
>            Priority: Critical
>
> In case of directory will not have any blocks, we need to get the bytesUsed 
> from all the keys in the directory, but if we do that it will be an expensive 
> operation.
> _Just some thought:_ Can we maintain byteUsed at directory level also, so we 
> can sum up all byteUsed at directory level. Need to think more here.
> Review comment 
> [1|https://github.com/apache/ozone/pull/1668#discussion_r537943319] and 
> [2|https://github.com/apache/ozone/pull/1607#discussion_r529974503]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to