[
https://issues.apache.org/jira/browse/YARN-1984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14223261#comment-14223261
]
Varun Saxena commented on YARN-1984:
------------------------------------
Thanks [~zjshen] for the review.
loadVersion needs to handle DBException because DB#get can throw DBException.
I guess handling DBException inside deleteNextEntity is a matter of choice. But
as the method advertises throwing only IOException, handling DBException inside
the method would avoid any mistakes in future if a developer chooses to call
this method and overlooks handling DBException.
You are correct. handleException can be changed to static and take one more
error code. Will upload a patch with these changes.
> 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)