You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ZanderXu (Jira)" <ji...@apache.org> on 2024/02/27 07:35:00 UTC

[jira] [Assigned] (HDFS-17398) [FGL] Implement the FGL lock for FSNamesystemLock

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

ZanderXu reassigned HDFS-17398:
-------------------------------

    Assignee: ZanderXu

> [FGL] Implement the FGL lock for FSNamesystemLock
> -------------------------------------------------
>
>                 Key: HDFS-17398
>                 URL: https://issues.apache.org/jira/browse/HDFS-17398
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Major
>
> 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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org