[ 
https://issues.apache.org/jira/browse/HDDS-17680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-17680:
----------------------------------
    Labels: pull-request-available  (was: )

> Recon bucket disk usage includes subdirectory data in sizeDirectKey
> -------------------------------------------------------------------
>
>                 Key: HDDS-17680
>                 URL: https://issues.apache.org/jira/browse/HDDS-17680
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone Recon
>    Affects Versions: 2.2.2
>            Reporter: Wei-Chiu Chuang
>            Priority: Major
>              Labels: pull-request-available
>
> Recon reports the total bucket size as sizeDirectKey, including files in 
> subdirectories. Total size and replicated size remain correct.
> Reproduction on Ozone 2.2.2:
> 1. Create an FSO bucket and put all keys under subdirectories.
> 2. Request /api/v1/namespace/usage?path=/volume/bucket&replica=true.
> 3. With 63 bytes in subdirectories and no direct keys, sizeDirectKey is 63; 
> expected 0. The total size is 63 and sizeWithReplica is 189.
> A focused regression test, 
> TestNSSummaryEndpoint#testBucketDirectKeySizeExcludesSubdirectories, also 
> reproduces this for both FSO and Legacy buckets. The existing fixture has a 
> 500-byte direct key and 11,768 bytes in total. sizeDirectKey returns 11,768 
> rather than 500; total and replicated-size assertions pass.
> BucketEntityHandler.getDuResponse assigns NSSummary.getSizeOfFiles(), which 
> contains the aggregated subtree size, directly to the direct-key size field. 
> Compute the direct-key size separately while preserving aggregated totals.
> Acceptance: the regression passes for FSO and Legacy buckets, including a 
> bucket with no direct keys. Check directory-level usage for the same 
> aggregation mistake.
> Found while validating HDDS-17624.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to