|
@@ -3976,13 +3976,13 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
*/
|
|
*/
|
|
void renewLease(String holder) throws IOException {
|
|
void renewLease(String holder) throws IOException {
|
|
checkOperation(OperationCategory.WRITE);
|
|
checkOperation(OperationCategory.WRITE);
|
|
- writeLock();
|
|
|
|
|
|
+ readLock();
|
|
try {
|
|
try {
|
|
checkOperation(OperationCategory.WRITE);
|
|
checkOperation(OperationCategory.WRITE);
|
|
checkNameNodeSafeMode("Cannot renew lease for " + holder);
|
|
checkNameNodeSafeMode("Cannot renew lease for " + holder);
|
|
leaseManager.renewLease(holder);
|
|
leaseManager.renewLease(holder);
|
|
} finally {
|
|
} finally {
|
|
- writeUnlock();
|
|
|
|
|
|
+ readUnlock();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|