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 "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/10/09 10:30:00 UTC

[jira] [Commented] (HDFS-16787) Remove redundant lock in DataSetLockManager#removeLock in datanode.

    [ https://issues.apache.org/jira/browse/HDFS-16787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17614682#comment-17614682 ] 

ASF GitHub Bot commented on HDFS-16787:
---------------------------------------

ZanderXu commented on PR #4948:
URL: https://github.com/apache/hadoop/pull/4948#issuecomment-1272510653

   The failed UT `hadoop.hdfs.server.namenode.ha.TestObserverNode` has nothing to do with this PR. And I'm trying to reproduce it and locating the root cause locally. I will create a new PR to fix it if I get it.




> Remove redundant lock in DataSetLockManager#removeLock in datanode.
> -------------------------------------------------------------------
>
>                 Key: HDFS-16787
>                 URL: https://issues.apache.org/jira/browse/HDFS-16787
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Major
>              Labels: pull-request-available
>
> During patching the datanode fine-grained locking, found there is a redundant lock in DataSetLockManager#removeLock, and the code as bellow:
> {code:java}
> @Override
> public void removeLock(LockLevel level, String... resources) {
>   String lockName = generateLockName(level, resources);
>   try (AutoCloseDataSetLock lock = writeLock(level, resources)) {
>     // Here, this lock is redundant.
>     lock.lock();
>     lockMap.removeLock(lockName);
>   }
> } {code}



--
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