HDFS-16235. Fix Deadlock in LeaseRenewer for static remove method (#3472)

This commit is contained in:
AngersZhuuuu 2021-09-25 18:17:44 +08:00 committed by GitHub
parent 87632bbacf
commit 5f9321a5d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
}
/**