This is an automated email from the ASF dual-hosted git repository.

hexiaoqiao pushed a commit to branch branch-3.2.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git

commit 2bd78b7eaafaca50822c95c68755c7c3ad41be34
Author: AngersZhuuuu <[email protected]>
AuthorDate: Sat Sep 25 18:17:44 2021 +0800

    HDFS-16235. Fix Deadlock in LeaseRenewer for static remove method (#3472)
    
    (cherry picked from commit 5f9321a5d4112e7b4ee9e6b948ce46a2b152a2db)
    (cherry picked from commit 1df3b3de463332b688299078a59265ce405af6ac)
---
 .../main/java/org/apache/hadoop/hdfs/client/impl/LeaseRenewer.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/LeaseRenewer.java
 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/LeaseRenewer.java
index 8012f714..74a125b 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/LeaseRenewer.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/LeaseRenewer.java
@@ -96,7 +96,9 @@ public class LeaseRenewer {
    * @param renewer Instance to be cleared from Factory
    */
   public static void remove(LeaseRenewer renewer) {
-    Factory.INSTANCE.remove(renewer);
+    synchronized (renewer) {
+      Factory.INSTANCE.remove(renewer);
+    }
   }
 
   /**

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to