You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Zhijie Shen (JIRA)" <ji...@apache.org> on 2014/11/24 19:16:13 UTC

[jira] [Comment Edited] (YARN-1984) LeveldbTimelineStore does not handle db exceptions properly

    [ https://issues.apache.org/jira/browse/YARN-1984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14223225#comment-14223225 ] 

Zhijie Shen edited comment on YARN-1984 at 11/24/14 6:15 PM:
-------------------------------------------------------------

Thanks for your effort, Varun and Jason!

bq. Is there a reason to have deleteNextEntity throw DBException rather than IOException? It would be cleaner for callers if deleteNextEnttiy handled this.

Maybe we don't need to to that. It's consistent to catch DBException at the same method where LeveldbIterator is constructed, but not at the inner method where LeveldbIterator is passed in. The test case should be fine if we need to catch DBException separately when testing a private method.

bq. loadVersion can leak the runtime DBException

It seems that loadVersion doesn't user iterator. Or LeveldbIterator can help the get method too?

 BTW, handleException can be static and more general to taken one more param: error code, such that it can be reused in more places of this class.



was (Author: zjshen):
Thanks for your effort, Varun and Jason!

bq. Is there a reason to have deleteNextEntity throw DBException rather than IOException? It would be cleaner for callers if deleteNextEnttiy handled this.

Maybe we don't need to to that. It's consistent to catch DBException at the same method where LeveldbIterator is constructed, but not at the inner method where LeveldbIterator is passed in. The test case should be fine if we need to catch DBException separately when testing a private method.

bq. loadVersion can leak the runtime DBException

It seems that loadVersion doesn't user iterator. Or LeveldbIterator can help the get method too?

 


> LeveldbTimelineStore does not handle db exceptions properly
> -----------------------------------------------------------
>
>                 Key: YARN-1984
>                 URL: https://issues.apache.org/jira/browse/YARN-1984
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>    Affects Versions: 2.4.0
>            Reporter: Jason Lowe
>            Assignee: Varun Saxena
>             Fix For: 2.7.0
>
>         Attachments: YARN-1984.001.patch, YARN-1984.patch
>
>
> The org.iq80.leveldb.DB and DBIterator methods throw runtime exceptions rather than IOException which can easily leak up the stack and kill threads (e.g.: the deletion thread).



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