Description
Original Code:
//
// If the file is under construction , then it must be in our
// leases. Find the appropriate lease record.
//
Lease lease = leaseManager.getLease(new StringBytesWritable(holder));
//
// We found the lease for this file. And surprisingly the original
// holder is trying to recreate this file. This should never occur.
//
if (lease != null)
Problem: if another client (who has had some file leases) to recreate the underconstruction file, it can't trigger the lease recovery.
Reason: we should do:
if (new StringBytesWritable(holder).equals(pendingFile.clientName)){
throw new AlreadyBeingCreatedException(
"failed to create file " + src + " for " + holder +
" on client " + clientMachine +
" because current leaseholder is trying to recreate file.");
}
Attachments
Attachments
Issue Links
- is blocked by
-
HDFS-200 In HDFS, sync() not yet guarantees data available to the new readers
- Closed