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

Layam Pavan Venkat commented on HDDS-16364:
-------------------------------------------

*Another issue found while working on this: open keys report the size set at 
creation, not what they hold*

While investigating the MPU size mismatch, I found that regular open keys are 
also reported with the wrong size in Recon. OM sets an open key's {{dataSize}} 
when the key is created and does not update it as blocks are allocated 
({{OMAllocateBlockRequest}} only appends blocks). The real {{dataSize}} is 
written only on commit. So Recon's open-key sizes reflect the creation value:
* FSO ({{ofs}} / {{ozone fs -put}}): the client declares 0, and 
{{OMFileCreateRequest}} stores one block size ({{scmBlockSize}}).
* OBS ({{ozone sh key put}} from a pipe): {{PutKeyHandler}} declares 
{{File.length()}}, which is 0 for a pipe, so {{dataSize}} is 0 and no blocks 
are preallocated.

Repro on compose (1 MiB block size), 5.5 MiB written to each key and held open:
* OM: 6 blocks of 1 MiB allocated per key
* Datanode: 5 MiB flushed per key (last half block still buffered on the client)
* Recon {{/api/v1/keys/open/summary}} and {{/api/v1/keys/open}}: 1 MiB for the 
FSO key, 0 for the OBS key

> OpenKey size is not consistent across different endpoints in Recon
> ------------------------------------------------------------------
>
>                 Key: HDDS-16364
>                 URL: https://issues.apache.org/jira/browse/HDDS-16364
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone Recon
>            Reporter: Priyesh Karatha
>            Assignee: Layam Pavan Venkat
>            Priority: Major
>
> We have multiple endpoints for showing openkey information.
> {code:java}
> /api/v1/keys/open/summary
> /api/v1/keys/open/mpu/summary
> /api/v1/keys/open?includeFso=true&includeNonFso=false&limit=1000{code}
> The output of `/api/v1/keys/open/summary` and 
> `/api/v1/keys/open?includeFso=true&includeNonFso=false&limit=1000` and shows 
> keys count but size is always 0. So we have to define these APIs properly.



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

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

Reply via email to