-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58281/#review171494
-----------------------------------------------------------


Fix it, then Ship it!




Ship It!


sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java
Lines 2592 (patched)
<https://reviews.apache.org/r/58281/#comment244423>

    I'd suggest to use barrier to make sure all threads start racing at the 
same time. This will improve chance of getting conflicts.



sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java
Lines 2606 (patched)
<https://reviews.apache.org/r/58281/#comment244424>

    shutdown will cancel all pending jobs - do you need to wait until all are 
done? Otherwise you might miss some updates



sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java
Lines 2616 (patched)
<https://reviews.apache.org/r/58281/#comment244425>

    it may be better to log it rather then print to stdout


- Alexander Kolbasov


On April 10, 2017, 7:54 p.m., Lei Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58281/
> -----------------------------------------------------------
> 
> (Updated April 10, 2017, 7:54 p.m.)
> 
> 
> Review request for sentry.
> 
> 
> Bugs: SENTRY-1643
>     https://issues.apache.org/jira/browse/SENTRY-1643
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> When it relies on the SQL auto increment primary key as ChangeID, it can not 
> guarentee the consectivity of the IDs, because while each transaction claims 
> new ID from the table counter, the concurrent transactions which were not 
> success would not return the claimed changeIDs to the pool, thus it can not 
> guarateen the consectivity of change IDs.
> 
> This patch changes to use application logic to force the consectivity of IDs.
> 
> 
> Diffs
> -----
> 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPathChange.java
>  a0d34459d7b2f70e863ef6e078401df81381c91b 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPermChange.java
>  476fbcb2ad26de23757842111beb12b154e1562b 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/DeltaTransactionBlock.java
>  f590a5296c047e1acedd39a4f2e4f1de98008d32 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
>  802b9c6cbf8e9ad015e37037b809b58c956de746 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java
>  aaa0b9fd30bb68fded67f885af4f77bc71398e77 
> 
> 
> Diff: https://reviews.apache.org/r/58281/diff/2/
> 
> 
> Testing
> -------
> 
> Add a new test to conurrently insert changes. 
> 
> mvn test -Dtest=TestSentryStore.
> 
> 
> Thanks,
> 
> Lei Xu
> 
>

Reply via email to