You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Sammi Chen (Jira)" <ji...@apache.org> on 2025/05/12 08:02:00 UTC

[jira] [Updated] (HDDS-12919) Remove redundant FileLock from ChunkWrite

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

Sammi Chen updated HDDS-12919:
------------------------------
    Summary: Remove redundant FileLock from ChunkWrite  (was: Remove FileLock from ChunkWrite)

> Remove redundant FileLock from ChunkWrite
> -----------------------------------------
>
>                 Key: HDDS-12919
>                 URL: https://issues.apache.org/jira/browse/HDDS-12919
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Sammi Chen
>            Assignee: Sammi Chen
>            Priority: Major
>              Labels: pull-request-available
>
> Currently before chunk read and write, it will acquire a read or write lock from fileStripedLock in ChunkUtils, so that read and write are welly controlled in Datanode. 
> For chunk write, it further acquires an exclusive FileLock after acquire the write lock from fileStripedLock.  As the FileLock mainly acts as inter-process lock purpose, to prevent another process from reading or writing to the same lock region, which is not a case in Ozone, there are no other processes which will read/write the same block file as Datanode.  So acquire this exclusive FileLock after already holding the write lock from fileStripedLock is not necessary. 
> This task aims to remove the FileLock acquire for chunk write. 
> BTW, it took ~2ms to acquire a FileLock, ~0.15ms to acquire a LOCK from fileStripedLock. 
> And FileLock doesn't prevent file get deleted by another thread. 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org