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

Wei-Chiu Chuang resolved HDDS-15877.
------------------------------------
    Fix Version/s: 2.3.0
       Resolution: Fixed

> Extend getFileStatus head-op (type-only) optimization to o3fs and remaining 
> type-only callers
> ---------------------------------------------------------------------------------------------
>
>                 Key: HDDS-15877
>                 URL: https://issues.apache.org/jira/browse/HDDS-15877
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.3.0
>
>
> Follow-up of HDDS-15678.
> HDDS-15678 added a {{headOp}} (metadata/type-only) flag so ofs:// 
> isDirectory/isFile skip the SCM pipeline refresh and block-location 
> retrieval. The following call sites still fetch a full FileStatus only to 
> check file-vs-directory and should adopt the same head-op path:
> # *o3fs BasicOzoneFileSystem.isDirectory/isFile* (primary) — still delegate 
> to the deprecated super.isDirectory/isFile, which trigger a full 
> getFileStatus + pipeline refresh. Requires plumbing headOp through 
> OzoneClientAdapter / BasicOzoneClientAdapterImpl.getFileStatus (mirroring 
> what HDDS-15678 did for the rooted adapter). Without this, o3fs still pays 
> the SCM round-trip while ofs does not.
> # *DeleteKeyHandler (cli-shell)* — 
> bucket.getFileStatus(keyName).isDirectory() (L103) and 
> bucket.getFileStatus(toKeyName).isDirectory() (L125) use the status only for 
> the directory check; switch to getFileStatus(key, true) (API already exists).
> # *Trash-root checks* — BasicOzoneFileSystem#getTrashRoots (L787) and 
> BasicRootedOzoneClientAdapterImpl (L764) type-check via 
> getFileStatus(...).isDirectory(); the latter also double-fetches the status 
> (minor cleanup).
> h3. Acceptance
> * o3fs isDirectory/isFile skip pipeline refresh (verified like the ofs tests)
> * type-only callers pass headOp=true
> * no behavior change for FileNotFoundException



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