> On Feb. 22, 2019, 6:48 p.m., Haley Reeve wrote:
> > sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/HMSPaths.java
> > Line 689 (original), 694 (patched)
> > <https://reviews.apache.org/r/70043/diff/1/?file=2126422#file2126422line696>
> >
> >     Why the change from sets to lists? Was there some kind of duplicate 
> > entries that were getting lost when using a set? (Just asking for my own 
> > curiosity since I'm not super familiar with this code.)

We were using HashSet before. When a element is inserted into hashset there is 
hash value calculated and stored for that element. This hash value is used for 
future lookups.

Entry's that were inserted into hashset are updated later over time. There are 
no reference older Entry. If we use the updated Entry to find/delete it from 
the set it will be found/delted. Reason for that is that hash value of Entry 
which is updated does not match hash value calculated when it was inserted. As 
a result, code we had was never able to remove the entries from 
authzObjToEntries. That is the reason i have changed it to a list.


- kalyan kumar


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


On Feb. 22, 2019, 6:40 p.m., kalyan kumar kalvagadda wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70043/
> -----------------------------------------------------------
> 
> (Updated Feb. 22, 2019, 6:40 p.m.)
> 
> 
> Review request for sentry, Arjun Mishra, Haley Reeve, and Na Li.
> 
> 
> Bugs: SENTRY-2502
>     https://issues.apache.org/jira/browse/SENTRY-2502
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> Sentry plug-in in name node is stopping to fetch updates from sentry server 
> when below sequence of events occurs.
> 
> Create a table
> Add a single partition to it.
> Rename the table created above.
> Drop the partition added above
> Add the partition again.
> Rename the table
> 
> There are a couple of issues observed
> 
> When the table is renamed the Entry object for the table that is renamed is 
> wrongly update. Type of Entry is changed to "DIR".
> When paths have removed the entries with empty paths are not removed from the 
> collection of Entries for an object.
> These two issues can manifest in multiple problems. Issue reported in this 
> Jira is one such problem.
> 
> 
> Diffs
> -----
> 
>   
> sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/HMSPaths.java
>  1dfa1d9aafbd482903e4bb935509a76768e02b58 
>   
> sentry-hdfs/sentry-hdfs-common/src/main/java/org/apache/sentry/hdfs/HMSPathsDumper.java
>  8a7c8a2901af18b375f8637572d9b3ddee0ded6c 
>   
> sentry-hdfs/sentry-hdfs-namenode-plugin/src/main/java/org/apache/sentry/hdfs/SentryAuthorizationInfo.java
>  9fe22ef8cc1533b28462e2b8749e3ba0e7b56582 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegrationEnd2End.java
>  574bc4b0432824abc81fe3c0dd30d1fe01f012e5 
> 
> 
> Diff: https://reviews.apache.org/r/70043/diff/1/
> 
> 
> Testing
> -------
> 
> Added new test case to verify that issues that does not occur after the fix.
> 
> 
> Thanks,
> 
> kalyan kumar kalvagadda
> 
>

Reply via email to