From 62ff4e36cfaac640b24e96ccf0f9449bd27c5941 Mon Sep 17 00:00:00 2001 From: ZanderXu Date: Mon, 10 Oct 2022 20:05:02 +0800 Subject: [PATCH] HDFS-16787. Remove the redundant lock in DataSetLockManager#removeLock (#4948). Contributed by ZanderXu. Signed-off-by: He Xiaoqiao --- .../apache/hadoop/hdfs/server/datanode/DataSetLockManager.java | 1 - 1 file changed, 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataSetLockManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataSetLockManager.java index 1d59f87ab2..eac1259fb8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataSetLockManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataSetLockManager.java @@ -233,7 +233,6 @@ public void addLock(LockLevel level, String... resources) { public void removeLock(LockLevel level, String... resources) { String lockName = generateLockName(level, resources); try (AutoCloseDataSetLock lock = writeLock(level, resources)) { - lock.lock(); lockMap.removeLock(lockName); } }