You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Sravya Tirukkovalur <sr...@cloudera.com> on 2015/11/09 22:18:01 UTC

[DISCUSS] Handling of Exception in MetaStoreCacheIntializer

Hi folks,

Right now if there is an error condition in evaluating paths
in MetaStoreCacheIntilizer in one of the tasks, we throw a Runtime
Exception. The more I think about, it looks like it would be best to log an
error and continue; as a plugin should not cause the service to come down?
On the other hand, doing so might result in incomplete sync which might
make it hard to get to the root cause.

Tracking this at https://issues.apache.org/jira/browse/SENTRY-957

Please let me know your thoughts.

Thanks!
-- 
Sravya Tirukkovalur

Re: [DISCUSS] Handling of Exception in MetaStoreCacheIntializer

Posted by Sravya Tirukkovalur <sr...@cloudera.com>.
Thanks for the feedback folks, captured the discussion here:
https://issues.apache.org/jira/browse/SENTRY-957?focusedCommentId=15009480&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15009480

On Mon, Nov 9, 2015 at 4:44 PM, Lenni Kuff <ls...@cloudera.com> wrote:

> Another +1 for the loading behavior being atomic. I think we should retry
> as well, and be sure the number of retry attempts is configurable.
>
> For large metastores it might be useful to have a flag to change the fail
> vs log error behavior, but that can also be accomplished by just disabling
> the plugin. Maybe useful for debugging?
>
> Thanks,
> Lenni
> On Nov 9, 2015 4:32 PM, "Sravya Tirukkovalur" <sr...@apache.org> wrote:
>
> > +1 to initialization being atomic. And I guess throwing an initialization
> > exception after multiple retries should be fine. Still want to hear if
> any
> > one thinks logging an error is preferable.
> >
> >
> > On Mon, Nov 9, 2015 at 2:40 PM, Ryan P <ry...@gmail.com>
> wrote:
> >
> > > So I would definitely suggest thay the metastore cache initialization
> > phase
> > > be atomic. That being said we should introduce some sort of retry
> logic.
> > In
> > > the event we can't complete a task we throw an initialization
> exception.
> > > On Nov 9, 2015 4:18 PM, "Sravya Tirukkovalur" <sr...@cloudera.com>
> > wrote:
> > >
> > > > Hi folks,
> > > >
> > > > Right now if there is an error condition in evaluating paths
> > > > in MetaStoreCacheIntilizer in one of the tasks, we throw a Runtime
> > > > Exception. The more I think about, it looks like it would be best to
> > log
> > > an
> > > > error and continue; as a plugin should not cause the service to come
> > > down?
> > > > On the other hand, doing so might result in incomplete sync which
> might
> > > > make it hard to get to the root cause.
> > > >
> > > > Tracking this at https://issues.apache.org/jira/browse/SENTRY-957
> > > >
> > > > Please let me know your thoughts.
> > > >
> > > > Thanks!
> > > > --
> > > > Sravya Tirukkovalur
> > > >
> > >
> >
>



-- 
Sravya Tirukkovalur

Re: [DISCUSS] Handling of Exception in MetaStoreCacheIntializer

Posted by Lenni Kuff <ls...@cloudera.com>.
Another +1 for the loading behavior being atomic. I think we should retry
as well, and be sure the number of retry attempts is configurable.

For large metastores it might be useful to have a flag to change the fail
vs log error behavior, but that can also be accomplished by just disabling
the plugin. Maybe useful for debugging?

Thanks,
Lenni
On Nov 9, 2015 4:32 PM, "Sravya Tirukkovalur" <sr...@apache.org> wrote:

> +1 to initialization being atomic. And I guess throwing an initialization
> exception after multiple retries should be fine. Still want to hear if any
> one thinks logging an error is preferable.
>
>
> On Mon, Nov 9, 2015 at 2:40 PM, Ryan P <ry...@gmail.com> wrote:
>
> > So I would definitely suggest thay the metastore cache initialization
> phase
> > be atomic. That being said we should introduce some sort of retry logic.
> In
> > the event we can't complete a task we throw an initialization exception.
> > On Nov 9, 2015 4:18 PM, "Sravya Tirukkovalur" <sr...@cloudera.com>
> wrote:
> >
> > > Hi folks,
> > >
> > > Right now if there is an error condition in evaluating paths
> > > in MetaStoreCacheIntilizer in one of the tasks, we throw a Runtime
> > > Exception. The more I think about, it looks like it would be best to
> log
> > an
> > > error and continue; as a plugin should not cause the service to come
> > down?
> > > On the other hand, doing so might result in incomplete sync which might
> > > make it hard to get to the root cause.
> > >
> > > Tracking this at https://issues.apache.org/jira/browse/SENTRY-957
> > >
> > > Please let me know your thoughts.
> > >
> > > Thanks!
> > > --
> > > Sravya Tirukkovalur
> > >
> >
>

Re: [DISCUSS] Handling of Exception in MetaStoreCacheIntializer

Posted by Sravya Tirukkovalur <sr...@apache.org>.
+1 to initialization being atomic. And I guess throwing an initialization
exception after multiple retries should be fine. Still want to hear if any
one thinks logging an error is preferable.


On Mon, Nov 9, 2015 at 2:40 PM, Ryan P <ry...@gmail.com> wrote:

> So I would definitely suggest thay the metastore cache initialization phase
> be atomic. That being said we should introduce some sort of retry logic. In
> the event we can't complete a task we throw an initialization exception.
> On Nov 9, 2015 4:18 PM, "Sravya Tirukkovalur" <sr...@cloudera.com> wrote:
>
> > Hi folks,
> >
> > Right now if there is an error condition in evaluating paths
> > in MetaStoreCacheIntilizer in one of the tasks, we throw a Runtime
> > Exception. The more I think about, it looks like it would be best to log
> an
> > error and continue; as a plugin should not cause the service to come
> down?
> > On the other hand, doing so might result in incomplete sync which might
> > make it hard to get to the root cause.
> >
> > Tracking this at https://issues.apache.org/jira/browse/SENTRY-957
> >
> > Please let me know your thoughts.
> >
> > Thanks!
> > --
> > Sravya Tirukkovalur
> >
>

Re: [DISCUSS] Handling of Exception in MetaStoreCacheIntializer

Posted by Ryan P <ry...@gmail.com>.
So I would definitely suggest thay the metastore cache initialization phase
be atomic. That being said we should introduce some sort of retry logic. In
the event we can't complete a task we throw an initialization exception.
On Nov 9, 2015 4:18 PM, "Sravya Tirukkovalur" <sr...@cloudera.com> wrote:

> Hi folks,
>
> Right now if there is an error condition in evaluating paths
> in MetaStoreCacheIntilizer in one of the tasks, we throw a Runtime
> Exception. The more I think about, it looks like it would be best to log an
> error and continue; as a plugin should not cause the service to come down?
> On the other hand, doing so might result in incomplete sync which might
> make it hard to get to the root cause.
>
> Tracking this at https://issues.apache.org/jira/browse/SENTRY-957
>
> Please let me know your thoughts.
>
> Thanks!
> --
> Sravya Tirukkovalur
>