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

Attila Doroszlai updated HDDS-17916:
------------------------------------
    Fix Version/s: 2.3.0
       Resolution: Implemented
           Status: Resolved  (was: Patch Available)

> Seek on a multi-block key sends GetBlock for every block
> --------------------------------------------------------
>
>                 Key: HDDS-17916
>                 URL: https://issues.apache.org/jira/browse/HDDS-17916
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone Client
>            Reporter: Chu Cheng Li
>            Assignee: Chu Cheng Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.3.0
>
>
> Currently, performing a seek on a key triggers a {{GetBlock}} request for 
> _every_ block associated with that key, rather than just the specific block 
> being read. Because the S3 Gateway (S3G) performs a seek for every range GET 
> request, a range GET on a multipart object ends up costing one {{GetBlock}} 
> request per part.
> To put this in perspective: a small 4 KiB range GET on an object with 16 
> parts will unnecessarily send 16 {{GetBlock}} requests, whereas the same 
> operation on a single-block object only sends one.
>  
> *Cause:* This happens because {{MultipartInputStream.initialize()}} eagerly 
> calls {{BlockInputStream.initialize()}} across all blocks (behavior 
> introduced in HDDS-11220). However, this initialization is really only 
> necessary for under-construction blocks so we can fetch their exact length 
> from the DataNode. For all other finalized blocks, the Ozone Manager (OM) 
> already knows their lengths.
>  
> *Proposed Solution:* During a seek, we should only initialize blocks that are 
> actively under construction. The remaining blocks can lazily initialize upon 
> their first read. Notably, {{StreamBlockInputStream}} already handles this 
> correctly.
>  
> _Note: We spotted this issue while working with Flink ForSt state on S3 
> (HDDS-17894), which heavily relies on small range GETs to read multipart SST 
> files._



--
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