[ https://issues.apache.org/jira/browse/HDFS-17398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ZanderXu updated HDFS-17398: ---------------------------- Hadoop Flags: Reviewed Target Version/s: HDFS-17384 > [FGL] Implement the FGL lock for FSNLockManager > ----------------------------------------------- > > Key: HDFS-17398 > URL: https://issues.apache.org/jira/browse/HDFS-17398 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Affects Versions: HDFS-17384 > Reporter: ZanderXu > Assignee: ZanderXu > Priority: Major > Labels: FGL > > Implement the FGL lock for the FSNamesystemLock. > We will use two global locks to implement this FGL lock in this milestone, > FSLock and BMLock. > The FSLock is used to protect some operations: > * Directory tree-related operations. > * FSEditLog related operations. > * ErasureCodingPolicy related operations. > The BMLock is used to protect some operations: > * Block related operations > * DN related operations > Both FSLock and BMLock are needed for some operations: > * The operations involves both directory tree and block > * The operations involves both directory tree and dn > * The operations involves both FSEdits and block > The lock order should be: > * Acquire the FSLock > * Acquire the BMLock > * Release the BMLock > * Release the FSLock > > This FGL class implements the FSNamesystemLock interface, and it will > acquire/release the locks according to the LockMode(GLOBAL, FS, BM). > Locking process: > * For the GLOBAL Lock mode, this FGL will acquire the FS lock first, then > acquire the BM lock > * For the FS Lock mode, this FGL will only acquire the FS lock > * For the BM Lock mode, this FGL will only acquire the BM lock. > Lock releasing process: > * For the GLOBAL Lock mode, this FGL will release the BM lock first, then > release the lock > * For the FS Lock mode, this FGL will only release the FS lock > * For the BM Lock mode, this FGL will only release the BM lock. -- 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