Hadoop Common
  1. Hadoop Common
  2. HADOOP-4054

During edit log loading, an underconstruction file's lease gets removed twice

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.19.0
    • Fix Version/s: 0.19.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The lease is removed on line 605: old = fsDir.unprotected(path, mtime);
      It then gets removed again on line 637: fsNamesys.leaseManager.removeLease(cons.clientName, path);

      The second removal results in an error message in the log, which is very annoying.

      1. editLogLease1.patch
        2 kB
        Hairong Kuang
      2. editLogLease.patch
        0.9 kB
        Hairong Kuang

        Activity

        Hide
        Hairong Kuang added a comment -

        The failed unit tests are not related to this issue. The patch has been manual tested. I just committed this.

        Show
        Hairong Kuang added a comment - The failed unit tests are not related to this issue. The patch has been manual tested. I just committed this.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12389471/editLogLease1.patch
        against trunk revision 693705.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        -1 core tests. The patch failed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3234/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3234/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3234/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3234/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12389471/editLogLease1.patch against trunk revision 693705. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3234/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3234/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3234/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3234/console This message is automatically generated.
        Hide
        Konstantin Shvachko added a comment -

        +1

        Show
        Konstantin Shvachko added a comment - +1
        Hide
        Hairong Kuang added a comment -

        Here is a patch that incorporates Konstantin's comments.

        Show
        Hairong Kuang added a comment - Here is a patch that incorporates Konstantin's comments.
        Hide
        Konstantin Shvachko added a comment -

        This looks right.
        But then you can also remove code that removes lease after unprotectedDelete() in line 673: in the OP_DELETE case.
        And then variable old can be removed as it is not used.

        Show
        Konstantin Shvachko added a comment - This looks right. But then you can also remove code that removes lease after unprotectedDelete() in line 673: in the OP_DELETE case. And then variable old can be removed as it is not used.
        Hide
        Hairong Kuang added a comment -

        A patch for review.

        Show
        Hairong Kuang added a comment - A patch for review.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I think we don't need that second removal.

        Show
        Tsz Wo Nicholas Sze added a comment - I think we don't need that second removal.

          People

          • Assignee:
            Hairong Kuang
            Reporter:
            Hairong Kuang
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development