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

James Clampffer updated HDFS-11758:
-----------------------------------
    Attachment: HDFS-11758.HDFS-8707.001.patch

Minor change to last patch because there was a bug in the tests.  TestReadEvent 
and TestReadEventThrow were supposed to do two hdfsPread calls on the same 
FileHandle to ensure throwing in the read handler wouldn't effect future reads. 
 Instead it was making a new FileHandle for the second read attempt.

> libhdfs++: Catch exceptions thrown by runtime hooks
> ---------------------------------------------------
>
>                 Key: HDFS-11758
>                 URL: https://issues.apache.org/jira/browse/HDFS-11758
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client
>            Reporter: James Clampffer
>            Assignee: James Clampffer
>         Attachments: HDFS-11758.HDFS-8707.000.patch, 
> HDFS-11758.HDFS-8707.001.patch
>
>
> Right now there's nothing to stop a user supplied event callback from 
> throwing and unwinding the stack on the asio worker thread.  This can lead to 
> async filesystem operations that never complete because the stack was unwound 
> before setting up the next async io call.
> Best practice is to be really careful about what is done inside event hooks 
> and callbacks: don't throw, sleep, or anything else that might block.  I've 
> seen a few issues pop up because a hook was made for monitoring purposes and 
> later on stuff that was able to throw was added without realizing where the 
> exception may end up.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to