> On June 9, 2017, 6:01 a.m., Alexander Kolbasov wrote:
> > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MHiveMetastoreImage.java
> > Lines 36 (patched)
> > <https://reviews.apache.org/r/59720/diff/6/?file=1744918#file1744918line36>
> >
> >     What is this??
> >     Do you really need it? I don't see any sues in the code and suspect 
> > that it isn't needed.
> 
> Sergio Pena wrote:
>     This is part of the conversation I had offline with another developer. 
> Because we don't have to waste DB unecessary with multiple images, then I'm 
> just adding this column as unique value to another transaction to persist an 
> image. It works btw, we always guarantee that 1 image is persisted. 
>     
>     Let me know about this approach, though. I'm ok with having multiple 
> images that won't be used, but I don't see this column harmful.

This is rather weird. Are you trying to implement singleton on a RDBMS? At 
least it is worth a long comment explaining what this is, but it is very 
suspicious.


- Alexander


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


On June 9, 2017, 4:17 p.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59720/
> -----------------------------------------------------------
> 
> (Updated June 9, 2017, 4:17 p.m.)
> 
> 
> Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and 
> Vamsee Yarlagadda.
> 
> 
> Bugs: SENTRY-1781
>     https://issues.apache.org/jira/browse/SENTRY-1781
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> This patch only adds an extra column to the MAuthzPathsMapping table that 
> contains an image identifier that will be used to detect full snapshots. This 
> patch does not increment the identifier yet, it only uses 0 for now.
> 
> TIPS for reviewers:
> 
> - package.jdo adds a new column name AUTHZ_IMG_ID to the AUTHZ_MAPS_MAPPING 
> table used to identify the paths that are part of a new hive snapshot.
> 
> - MAuthzPathsMapping.java adds the the new column and API to handle JDO 
> requests.
> 
> - SentryStore.java modifies all methods that interact with the snapshots. It 
> makes sure that
>   when persisting a new snapshot, then the authzImgID is incremented and the 
> old one is
>   deleted. Also it makes sure that retrieve/add/delete/rename/update uses the 
> current 
>   authzImgID whenver they're called.
> 
> - TestSentryStore.java adds unit tests to verify that all SentryStore API 
> work correctly
>   when a new hive snapshot is created.
> 
> 
> Diffs
> -----
> 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MAuthzPathsMapping.java
>  f51894bb7e109c37997e7134e07a82f46c0a3c44 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MHiveMetastoreImage.java
>  PRE-CREATION 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo
>  459939b7600e05d57c7e11eefe20c2591cac0b34 
>   
> sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java
>  17856a4425be5c8971c51f7cfd9b2ef06001a2ab 
>   
> sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java
>  788062c12ab4e4180adf2d4b4a191e9b5c616f87 
> 
> 
> Diff: https://reviews.apache.org/r/59720/diff/7/
> 
> 
> Testing
> -------
> 
> All unit tests run locally, but there are some flaky tests on Jenkins no 
> related to this patch.
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>

Reply via email to