[ https://issues.apache.org/jira/browse/HDDS-11402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17883589#comment-17883589 ]
weiming edited comment on HDDS-11402 at 9/23/24 2:16 AM: --------------------------------------------------------- [~weichiu] " So it's a pure overhead for most users. What does it do for block files? Can we simply disable it for block files? " I have some questions for this issue and was hoping you could provide a more detailed explanation. FilePerBlockStrategy does not seem to use a read-write lock, so why is it necessary to disable it? Should we consider adding a read-write lock for the blocks to address this issue? was (Author: JIRAUSER280917): [~weichiu] ??So it's a pure overhead for most users. What does it do for block files? Can we simply disable it for block files? ?? I have some questions for this issue and was hoping you could provide a more detailed explanation. FilePerBlockStrategy does not seem to use a read-write lock, so why is it necessary to disable it? Should we consider adding a read-write lock for the blocks to address this issue? > FilePerBlockStrategy write path doesn't have a file lock > -------------------------------------------------------- > > Key: HDDS-11402 > URL: https://issues.apache.org/jira/browse/HDDS-11402 > Project: Apache Ozone > Issue Type: Bug > Reporter: Wei-Chiu Chuang > Priority: Major > > ChunkUtils implements a File read/write lock when reading chunk files. It's > added by HDDS-11281 to replace the original design that implemented an > exclusive lock for chunk files. > I just realized it doesn't work for blocks files (FilePerBlockStrategy), > which is the default container layout. So it's a pure overhead for most > users. What does it do for block files? Can we simply disable it for block > files? > In fact, even the original, exclusive lock design doesn't work for > FilePerBlockStrategy. > https://github.com/apache/ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java > The file lock on the write path is only instantiated by writeDataToFile(), > called by writeData(File, ChunkBuffer, long, long, HddsVolume, boolean), > called by FilePerChunkStrategy. > cc: [~adoroszlai] [~Nicholas Niu] [~ritesh] -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org