Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-495

Hadoop FSNamesystem startFileInternal() getLease() has bug

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 0.20.1
    • 0.20.2
    • namenode
    • None

    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)

      { throw new AlreadyBeingCreatedException( "failed to create file " + src + " for " + holder + " on client " + clientMachine + " because current leaseholder is trying to recreate file."); }

      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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            mry.maillist Ruyue Ma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment