hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-3330) If GetImageServlet throws an Error or RTE, response has HTTP "OK" status
Date Wed, 02 May 2012 06:19:19 GMT

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

Todd Lipcon updated HDFS-3330:
------------------------------

    Attachment: hdfs-3330.txt

Attached patch fixes the issue and adds a test for it. Without the fix, the test fails with
an EOFException trying to load an empty image file in the checkpointer.

I also took the liberty of reworking the fault injection we use for these tests. The old class
used integer constants which was pretty difficult to follow. I added a simple class with empty
methods which can be overridden in the unit tests - same idea but easier to read.
                
> If GetImageServlet throws an Error or RTE, response has HTTP "OK" status
> ------------------------------------------------------------------------
>
>                 Key: HDFS-3330
>                 URL: https://issues.apache.org/jira/browse/HDFS-3330
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 1.0.0, 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3330.txt
>
>
> Currently in GetImageServlet, we catch Exception but not other Errors or RTEs. So, if
the code ends up throwing one of these exceptions, the "response.sendError()" code doesn't
run, but the finally clause does run. This results in the servlet returning HTTP 200 OK and
an empty response, which causes the client to think it got a successful image transfer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message