Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2258

TestLeaseRecovery2 fails as lease hard limit is not reset to default

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0, 0.23.0
    • Component/s: namenode, test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      TestLeaseRecovery2.testSoftLeaseRecovery() fails as lease hard limit remains set to 1 sec from the previous test case. If initial file creation in testSoftLeaseRecovery() takes longer than 1 sec, NN correctly reassigns the lease to itself and starts recovery. The test fails as the client cannot hflush() and close the file.

      1. leaseRecovery2.patch
        1 kB
        Konstantin Shvachko
      2. leaseRecovery2-trunk.patch
        1 kB
        Konstantin Shvachko
      3. leaseRecovery2-trunk.patch
        1 kB
        Konstantin Shvachko
      4. leaseRecovery2-trunk.patch
        1 kB
        Konstantin Shvachko

        Activity

        Hide
        Konstantin Shvachko added a comment -

        Simple patch which resets default lease limits before running the test case.

        Show
        Konstantin Shvachko added a comment - Simple patch which resets default lease limits before running the test case.
        Hide
        Konstantin Shvachko added a comment -

        Ran tests and test-patch locally for 0.22. Tests passed modular TestHDFSCLI (HDFS-2232) and TestTrash (HDFS-1967). Ready to commit.

        Show
        Konstantin Shvachko added a comment - Ran tests and test-patch locally for 0.22. Tests passed modular TestHDFSCLI ( HDFS-2232 ) and TestTrash ( HDFS-1967 ). Ready to commit.
        Hide
        Uma Maheswara Rao G added a comment -

        Hi Konstantin,
        I verified the tests with this patch.
        Tests are passing!

        +1 from my side. I think it can be committed.

        --Thanks

        Show
        Uma Maheswara Rao G added a comment - Hi Konstantin, I verified the tests with this patch. Tests are passing! +1 from my side. I think it can be committed. --Thanks
        Hide
        Konstantin Shvachko added a comment -

        I just committed this to 0.22 branch.

        Show
        Konstantin Shvachko added a comment - I just committed this to 0.22 branch.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-22-branch #78 (See https://builds.apache.org/job/Hadoop-Hdfs-22-branch/78/)
        HDFS-2258. Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko

        shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1161315
        Files :

        • /hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt
        • /hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-22-branch #78 (See https://builds.apache.org/job/Hadoop-Hdfs-22-branch/78/ ) HDFS-2258 . Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1161315 Files : /hadoop/common/branches/branch-0.22/hdfs/CHANGES.txt /hadoop/common/branches/branch-0.22/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Hide
        Aaron T. Myers added a comment -

        Hey Konst, does an analogous change not also need to be made on trunk? I see that TestLeaseRecovery2 is working on trunk, despite not having this fix. Do you have any explanation for that?

        Show
        Aaron T. Myers added a comment - Hey Konst, does an analogous change not also need to be made on trunk? I see that TestLeaseRecovery2 is working on trunk, despite not having this fix. Do you have any explanation for that?
        Hide
        Konstantin Shvachko added a comment -

        The test is not failing because it's a timing issue. It fails in the debugger for me. I couldn't see TestLeaseRecovery2 in trunk (with all the restructuring). Will make a patch for trunk. Thanks Aaron.

        Show
        Konstantin Shvachko added a comment - The test is not failing because it's a timing issue. It fails in the debugger for me. I couldn't see TestLeaseRecovery2 in trunk (with all the restructuring). Will make a patch for trunk. Thanks Aaron.
        Hide
        Aaron T. Myers added a comment -

        Sounds good. Thanks, Konst.

        You might also consider using an @Before method in the test to reset the lease recovery periods to the default values before every test, rather than relying on each test manually resetting the values.

        Show
        Aaron T. Myers added a comment - Sounds good. Thanks, Konst. You might also consider using an @Before method in the test to reset the lease recovery periods to the default values before every test, rather than relying on each test manually resetting the values.
        Hide
        Konstantin Shvachko added a comment -

        Reopening to commit to trunk

        Show
        Konstantin Shvachko added a comment - Reopening to commit to trunk
        Hide
        Hadoop QA added a comment -

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

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1165//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/12491835/leaseRecovery2-trunk.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1165//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

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

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1168//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/12491868/leaseRecovery2-trunk.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1168//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

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

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1169//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/12491868/leaseRecovery2-trunk.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1169//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

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

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        +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 (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

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

        org.apache.hadoop.hdfs.TestDfsOverAvroRpc
        org.apache.hadoop.hdfs.server.blockmanagement.TestHost2NodesMap
        org.apache.hadoop.hdfs.server.datanode.TestReplicasMap
        org.apache.hadoop.hdfs.tools.offlineEditsViewer.TestOfflineEditsViewer

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1170//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1170//artifact/trunk/patchprocess/newPatchFindbugsWarningshadoop-hdfs.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1170//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/12491869/leaseRecovery2-trunk.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +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 (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hdfs.TestDfsOverAvroRpc org.apache.hadoop.hdfs.server.blockmanagement.TestHost2NodesMap org.apache.hadoop.hdfs.server.datanode.TestReplicasMap org.apache.hadoop.hdfs.tools.offlineEditsViewer.TestOfflineEditsViewer +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1170//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1170//artifact/trunk/patchprocess/newPatchFindbugsWarningshadoop-hdfs.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1170//console This message is automatically generated.
        Hide
        Aaron T. Myers added a comment -

        +1, the latest patch looks good to me. TestOfflineEditsViewer and TestDfsOverAvroRpc are currently failing on trunk. I feel confident the other test failures are unrelated to this patch.

        Show
        Aaron T. Myers added a comment - +1, the latest patch looks good to me. TestOfflineEditsViewer and TestDfsOverAvroRpc are currently failing on trunk. I feel confident the other test failures are unrelated to this patch.
        Hide
        Konstantin Shvachko added a comment -

        Committed this to trunk. Thanks for review Aaron.
        Using @Before is a good idea. Since in 0.22 this test is still in junit3 format I decided to keep the two versions in sync.

        Show
        Konstantin Shvachko added a comment - Committed this to trunk. Thanks for review Aaron. Using @Before is a good idea. Since in 0.22 this test is still in junit3 format I decided to keep the two versions in sync.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #816 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/816/)
        HDFS-2258. Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko

        shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #816 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/816/ ) HDFS-2258 . Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #893 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/893/)
        HDFS-2258. Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko

        shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #893 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/893/ ) HDFS-2258 . Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #826 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/826/)
        HDFS-2258. Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko

        shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #826 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/826/ ) HDFS-2258 . Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Hide
        Aaron T. Myers added a comment -

        Using @Before is a good idea. Since in 0.22 this test is still in junit3 format I decided to keep the two versions in sync.

        That seems reasonable. Hopefully the next time this test gets edited it will be converted to use Junit4.

        Thanks, Konst.

        Show
        Aaron T. Myers added a comment - Using @Before is a good idea. Since in 0.22 this test is still in junit3 format I decided to keep the two versions in sync. That seems reasonable. Hopefully the next time this test gets edited it will be converted to use Junit4. Thanks, Konst.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #779 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/779/)
        HDFS-2258. Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko

        shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #779 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/779/ ) HDFS-2258 . Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #803 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/803/)
        HDFS-2258. Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko

        shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #803 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/803/ ) HDFS-2258 . Reset lease limits to default values in TestLeaseRecovery2. Contributed by Konstantin Shvachko shv : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1163821 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLeaseRecovery2.java

          People

          • Assignee:
            Konstantin Shvachko
            Reporter:
            Konstantin Shvachko
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development