Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-1498

FSDirectory#unprotectedConcat calls setModificationTime on a file

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The HDFSConcat test fails when asserts are enabled because FSDirectory#unprotectedConcat calls INode#setModificationTime on a file, this method asserts that the argument is a directory. It should use setModificationTimeForce since we know the target is a file, it's mod time should be set to now unconditionally since we know we're modifying it. The behavior should be equivalent.

      1. hdfs-1498-1.patch
        0.7 kB
        Eli Collins

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        1h 59m 1 Eli Collins 14/Nov/10 07:05
        Patch Available Patch Available Resolved Resolved
        21h 56m 1 Eli Collins 15/Nov/10 05:02
        Eli Collins made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Hide
        Eli Collins added a comment -

        Thanks Cos. I've committed this.

        Show
        Eli Collins added a comment - Thanks Cos. I've committed this.
        Hide
        Konstantin Boudnik added a comment -

        BTW, it has been discussed a few times - there's no need to add numerical modifier to a patch file: JIRA takes care about this automatically.

        Show
        Konstantin Boudnik added a comment - BTW, it has been discussed a few times - there's no need to add numerical modifier to a patch file: JIRA takes care about this automatically.
        Hide
        Konstantin Boudnik added a comment -

        +1 patch looks good.

        Show
        Konstantin Boudnik added a comment - +1 patch looks good.
        Eli Collins made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 0.22.0 [ 12314241 ]
        Eli Collins made changes -
        Field Original Value New Value
        Attachment hdfs-1498-1.patch [ 12459542 ]
        Hide
        Eli Collins added a comment -

        Patched attached. One-liner. TestHDFSConcat now passes with asserts enabled.

        Show
        Eli Collins added a comment - Patched attached. One-liner. TestHDFSConcat now passes with asserts enabled.
        Eli Collins created issue -

          People

          • Assignee:
            Eli Collins
            Reporter:
            Eli Collins
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development