|
@@ -732,8 +732,10 @@ class DFSClient implements FSConstants {
|
|
while (clientRunning) {
|
|
while (clientRunning) {
|
|
if (System.currentTimeMillis() - lastRenewed > (LEASE_SOFTLIMIT_PERIOD / 2)) {
|
|
if (System.currentTimeMillis() - lastRenewed > (LEASE_SOFTLIMIT_PERIOD / 2)) {
|
|
try {
|
|
try {
|
|
- if (pendingCreates.size() > 0)
|
|
|
|
- namenode.renewLease(clientName);
|
|
|
|
|
|
+ synchronized (pendingCreates) {
|
|
|
|
+ if (pendingCreates.size() > 0)
|
|
|
|
+ namenode.renewLease(clientName);
|
|
|
|
+ }
|
|
lastRenewed = System.currentTimeMillis();
|
|
lastRenewed = System.currentTimeMillis();
|
|
} catch (IOException ie) {
|
|
} catch (IOException ie) {
|
|
String err = StringUtils.stringifyException(ie);
|
|
String err = StringUtils.stringifyException(ie);
|