You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Haley Reeve via Review Board <no...@reviews.apache.org> on 2019/02/06 17:05:46 UTC
Re: Review Request 69840: SENTRY-2491: Sentry High availability unit
tests run into deadlock sometimes
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69840/#review212610
-----------------------------------------------------------
Ship it!
Ship It!
- Haley Reeve
On Jan. 28, 2019, 4:19 p.m., Na Li wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69840/
> -----------------------------------------------------------
>
> (Updated Jan. 28, 2019, 4:19 p.m.)
>
>
> Review request for sentry, Arjun Mishra, Haley Reeve, and kalyan kumar kalvagadda.
>
>
> Bugs: sentry-2491
> https://issues.apache.org/jira/browse/sentry-2491
>
>
> Repository: sentry
>
>
> Description
> -------
>
> In sentry unit tests, we don't create schema before running a test. Instead, we use dataNucleus to create sentry tables when they are accessed. This creates potential deadlock when running test for Sentry HA setup.
>
> The solution is to let the instances of sentry service start with delay. Specifically,
> let HMS follower threads separate as far as possible, i.e., half of the interval.
>
> This deadlock only exists in unit tests, and does not exist in production because schema is created before starting Sentry services. Therefore, there is no table creation after service starts.
>
>
> Diffs
> -----
>
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/minisentry/InternalSentrySrv.java 9fa42f2
>
>
> Diff: https://reviews.apache.org/r/69840/diff/3/
>
>
> Testing
> -------
>
> such deadlock does not happen with this fix.
> Other unit tests passed
>
>
> Thanks,
>
> Na Li
>
>