[
https://issues.apache.org/jira/browse/HDFS-17387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17821000#comment-17821000
]
ASF GitHub Bot commented on HDFS-17387:
---------------------------------------
ZanderXu commented on code in PR #6572:
URL: https://github.com/apache/hadoop/pull/6572#discussion_r1503725124
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -871,7 +876,10 @@ static FSNamesystem loadFromDisk(Configuration conf)
throws IOException {
this.contextFieldSeparator =
conf.get(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY,
HADOOP_CALLER_CONTEXT_SEPARATOR_DEFAULT);
- fsLock = new FSNamesystemLock(conf, detailedLockHoldTimeMetrics);
+ Class<? extends FSNamesystemLock> lockKlass = conf.getClass(
+ DFS_NAMENODE_LOCK_MODEL_PROVIDER_KEY,
DFS_NAMENODE_LOCK_MODEL_PROVIDER_DEFAULT,
+ FSNamesystemLock.class);
+ fsLock = createLock(lockKlass, conf, detailedLockHoldTimeMetrics);
Review Comment:
Yes, `GlobalFSNamesystemLock` should be the default class.
But in order to find dead locks for the other PRs via UT, I just change this
value to FGL first.
After we complete all sub-tasks of this milestone, I will change the default
value to GlobalFSNamesystemLock.
> [FGL] Abstract the configurable locking mode
> --------------------------------------------
>
> Key: HDFS-17387
> URL: https://issues.apache.org/jira/browse/HDFS-17387
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: ZanderXu
> Assignee: ZanderXu
> Priority: Major
> Labels: pull-request-available
>
> Abstract a lock mode to cover the current global lock and the new
> fine-grained lock(global FS lock and global BM lock).
> End-user can select to use lock mode through configuration.
> The possible lock modes after this patch are as follows:
> * GLOBAL Lock
> * FS Lock
> * BM Lock
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]