[ https://issues.apache.org/jira/browse/HDFS-17390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17824009#comment-17824009 ]
ASF GitHub Bot commented on HDFS-17390: --------------------------------------- ferhui commented on PR #6573: URL: https://github.com/apache/hadoop/pull/6573#issuecomment-1980904344 Failed cases are unrelated. > [FGL] FSDirectory supports this fine-grained locking > ---------------------------------------------------- > > Key: HDFS-17390 > URL: https://issues.apache.org/jira/browse/HDFS-17390 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: ZanderXu > Assignee: ZanderXu > Priority: Major > Labels: pull-request-available > > {code:java} > /** > * The directory lock dirLock provided redundant locking. > * It has been used whenever namesystem.fsLock was used. > * dirLock is now removed and utility methods to acquire and release dirLock > * remain as placeholders only > */ > void readLock() { > assert namesystem.hasReadLock() : "Should hold namesystem read lock"; > } > void readUnlock() { > assert namesystem.hasReadLock() : "Should hold namesystem read lock"; > } > void writeLock() { > assert namesystem.hasWriteLock() : "Should hold namesystem write lock"; > } > void writeUnlock() { > assert namesystem.hasWriteLock() : "Should hold namesystem write lock"; > } > boolean hasWriteLock() { > return namesystem.hasWriteLock(); > } > boolean hasReadLock() { > return namesystem.hasReadLock(); > } > @Deprecated // dirLock is obsolete, use namesystem.fsLock instead > public int getReadHoldCount() { > return namesystem.getReadHoldCount(); > } > @Deprecated // dirLock is obsolete, use namesystem.fsLock instead > public int getWriteHoldCount() { > return namesystem.getWriteHoldCount(); > } > public int getListLimit() { > return lsLimit; > } {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org