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

Alexander Kolbasov commented on SENTRY-1676:
--------------------------------------------

As part of the change I am also adding some extra cleanup:

* Removed the useless count of pending tasks - the get() method will block 
until the specific task is complete.
* Small style cleanup
* Fixed reporting for failures where it showed 0 retries and didn't show stack 
trace for the exception

> FullUpdateInitializer#createInitialUpdate should not throw RuntimeException
> ---------------------------------------------------------------------------
>
>                 Key: SENTRY-1676
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1676
>             Project: Sentry
>          Issue Type: Sub-task
>          Components: Hdfs Plugin
>    Affects Versions: sentry-ha-redesign
>            Reporter: Lei (Eddy) Xu
>            Assignee: Alexander Kolbasov
>              Labels: bite-sized, newbie
>             Fix For: sentry-ha-redesign
>
>         Attachments: SENTRY-1676.001-sentry-ha-redesign.patch
>
>
> In {{FullUpdateInitialize#createInitialUpdate}}, it wraps any exception 
> occurred in db tasks using {{RuntimeException}}
> {code:title=FullUpdateInitialize.createInitialUpdate()}
>  // Fail the HMS startup if tasks are not all successful and
>  // fail on partial updates flag is set in the config.
>  if (!callResult.getSuccessStatus() && failOnRetry) {
>     throw new RuntimeException(callResult.getFailure());
>  }
> {code}
> We should not use {{RumtimeException}} here, because it is an unchecked 
> exception, which is easier to miss to catch from the callers.



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

Reply via email to