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

Zhijie Shen commented on YARN-1984:
-----------------------------------

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)

Reply via email to