Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3-alpha
    • Fix Version/s: 2.0.3-alpha
    • Component/s: None
    • Labels:
      None

      Description

      SocketCache should use monotonic time, not wall-clock time. Otherwise, if the time is adjusted by ntpd or a system administrator, sockets could be either abrupbtly expired, or left in the cache indefinitely.

      1. HDFS-4307.002.patch
        2 kB
        Colin Patrick McCabe
      2. HDFS-4307.001.patch
        2 kB
        Colin Patrick McCabe

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        8m 20s 1 Colin Patrick McCabe 12/Dec/12 18:46
        Patch Available Patch Available Resolved Resolved
        1d 3h 27m 1 Aaron T. Myers 13/Dec/12 22:13
        Resolved Resolved Closed Closed
        63d 14h 58m 1 Arun C Murthy 15/Feb/13 13:12
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #467 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/467/)
        Revert HDFS-4307 (Revision 1423066)
        HDFS-4307. SocketCache should use monotonic time (Colin Patrick McCabe via tgraves) (Revision 1422971)

        Result = UNSTABLE
        tgraves : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423066
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java

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

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #467 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/467/ ) Revert HDFS-4307 (Revision 1423066) HDFS-4307 . SocketCache should use monotonic time (Colin Patrick McCabe via tgraves) (Revision 1422971) Result = UNSTABLE tgraves : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1423066 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java tgraves : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1422971 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Thomas Graves made changes -
        Fix Version/s 0.23.6 [ 12323503 ]
        Hide
        Thomas Graves added a comment -

        Reverted due to missing Time class.

        Show
        Thomas Graves added a comment - Reverted due to missing Time class.
        Thomas Graves made changes -
        Fix Version/s 0.23.6 [ 12323503 ]
        Hide
        Thomas Graves added a comment -

        I pulled into branch-0.23 also.

        Show
        Thomas Graves added a comment - I pulled into branch-0.23 also.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1285 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1285/)
        HDFS-4307. SocketCache should use monotonic time. Contributed by Colin Patrick McCabe. (Revision 1421572)

        Result = SUCCESS
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1421572
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1285 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1285/ ) HDFS-4307 . SocketCache should use monotonic time. Contributed by Colin Patrick McCabe. (Revision 1421572) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1421572 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1254 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1254/)
        HDFS-4307. SocketCache should use monotonic time. Contributed by Colin Patrick McCabe. (Revision 1421572)

        Result = FAILURE
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1421572
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1254 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1254/ ) HDFS-4307 . SocketCache should use monotonic time. Contributed by Colin Patrick McCabe. (Revision 1421572) Result = FAILURE atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1421572 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Yarn-trunk #65 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/65/)
        HDFS-4307. SocketCache should use monotonic time. Contributed by Colin Patrick McCabe. (Revision 1421572)

        Result = SUCCESS
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1421572
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Show
        Hudson added a comment - Integrated in Hadoop-Yarn-trunk #65 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/65/ ) HDFS-4307 . SocketCache should use monotonic time. Contributed by Colin Patrick McCabe. (Revision 1421572) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1421572 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #3121 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3121/)
        HDFS-4307. SocketCache should use monotonic time. Contributed by Colin Patrick McCabe. (Revision 1421572)

        Result = SUCCESS
        atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1421572
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Show
        Hudson added a comment - Integrated in Hadoop-trunk-Commit #3121 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3121/ ) HDFS-4307 . SocketCache should use monotonic time. Contributed by Colin Patrick McCabe. (Revision 1421572) Result = SUCCESS atm : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1421572 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/SocketCache.java
        Aaron T. Myers made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 2.0.3-alpha [ 12323274 ]
        Resolution Fixed [ 1 ]
        Hide
        Aaron T. Myers added a comment -

        I've just committed this to trunk and branch-2.

        Thanks a lot for the contribution, Colin, and thanks a lot for the review, Andy.

        Show
        Aaron T. Myers added a comment - I've just committed this to trunk and branch-2. Thanks a lot for the contribution, Colin, and thanks a lot for the review, Andy.
        Hide
        Aaron T. Myers added a comment -

        +1, the latest patch looks good to me. I agree that writing a test for this isn't warranted in this case.

        I'm going to commit this momentarily.

        Show
        Aaron T. Myers added a comment - +1, the latest patch looks good to me. I agree that writing a test for this isn't warranted in this case. I'm going to commit this momentarily.
        Hide
        Colin Patrick McCabe added a comment -

        yeah, sadly changing the system clock is not something a junit test can realistically do

        Show
        Colin Patrick McCabe added a comment - yeah, sadly changing the system clock is not something a junit test can realistically do
        Hide
        Andy Isaacson added a comment -

        HDFS-4307.002.patch

        LGTM! +1.

        Since the patch has no observable effects short of changing the system clock, the lack of tests included is justified.

        Show
        Andy Isaacson added a comment - HDFS-4307 .002.patch LGTM! +1. Since the patch has no observable effects short of changing the system clock, the lack of tests included is justified.
        Hide
        Hadoop QA added a comment -

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

        +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 new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

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

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

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +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 passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3651//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3651//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/12560652/HDFS-4307.002.patch against trunk revision . +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 new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +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 passed unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3651//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3651//console This message is automatically generated.
        Colin Patrick McCabe made changes -
        Attachment HDFS-4307.002.patch [ 12560652 ]
        Hide
        Hadoop QA added a comment -

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

        +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 new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

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

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

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +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 passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

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

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3650//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3650//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/12560613/HDFS-4307.001.patch against trunk revision . +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 new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +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 passed unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3650//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3650//console This message is automatically generated.
        Hide
        Andy Isaacson added a comment -

        + private static long getMonotonicMillis() {

        Seems like this could use org/apache/hadoop/util/Time.java:monotonicNow rather than rolling a local copy.

        + return System.nanoTime() / 1000;

        Alas, there are 1e6 nanoseconds per millisecond. (So just use the library routine which gets it right.)

        Show
        Andy Isaacson added a comment - + private static long getMonotonicMillis() { Seems like this could use org/apache/hadoop/util/Time.java:monotonicNow rather than rolling a local copy. + return System.nanoTime() / 1000; Alas, there are 1e6 nanoseconds per millisecond. (So just use the library routine which gets it right.)
        Colin Patrick McCabe made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Colin Patrick McCabe made changes -
        Field Original Value New Value
        Attachment HDFS-4307.001.patch [ 12560613 ]
        Colin Patrick McCabe created issue -

          People

          • Assignee:
            Colin Patrick McCabe
            Reporter:
            Colin Patrick McCabe
          • Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development