hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-7538) removedDst should be checked against null in the finally block of FSDirRenameOp#unprotectedRenameTo()
Date Wed, 25 Feb 2015 04:42:05 GMT

     [ https://issues.apache.org/jira/browse/HDFS-7538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Yu updated HDFS-7538:
-------------------------
    Resolution: Not a Problem
        Status: Resolved  (was: Patch Available)

> removedDst should be checked against null in the finally block of FSDirRenameOp#unprotectedRenameTo()
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-7538
>                 URL: https://issues.apache.org/jira/browse/HDFS-7538
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>            Priority: Minor
>         Attachments: hdfs-7538-001.patch
>
>
> {code}
>         if (removedDst != null) {
>           undoRemoveDst = false;
> ...
>       if (undoRemoveDst) {
>         // Rename failed - restore dst
>         if (dstParent.isDirectory() &&
>             dstParent.asDirectory().isWithSnapshot()) {
>           dstParent.asDirectory().undoRename4DstParent(removedDst,
> {code}
> If the first if check doesn't pass, removedDst would be null and undoRemoveDst may be
true.
> This combination would lead to NullPointerException in the finally block.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message