[ 
https://issues.apache.org/jira/browse/HBASE-10005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834589#comment-13834589
 ] 

Anoop Sam John commented on HBASE-10005:
----------------------------------------

While doing the clearAuths we get the current Auths for the given user and 
validate whether removing auth is already present for the user. This get 
happens from the cache. The cache update happens via zk data changed event and 
this thread can be bit late some times.
In test we 1st add auths and immediately clear some of them. When the 
clearAuths reaches the cache update might not have happened yet!!
 
Changed the code so that it gets the current auths for the user from 
hbase:labels table and not from cache. Any way these admin ops for the labels 
will not happen frequently.

> TestVisibilityLabels fails occasionally
> ---------------------------------------
>
>                 Key: HBASE-10005
>                 URL: https://issues.apache.org/jira/browse/HBASE-10005
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.0
>            Reporter: Ted Yu
>            Assignee: Anoop Sam John
>            Priority: Blocker
>             Fix For: 0.98.0
>
>         Attachments: HBASE-10005.patch, 
> org.apache.hadoop.hbase.security.visibility.TestVisibilityLabels-output.txt
>
>
> I got the following test failures running test suite on hadoop-2 where 
> distributed log replay was turned on :
> {code}
> testAddVisibilityLabelsOnRSRestart(org.apache.hadoop.hbase.security.visibility.TestVisibilityLabels)
>   Time elapsed: 0.019 sec  <<< FAILURE!
> java.lang.AssertionError: The count should be 8 expected:<8> but was:<6>
>   at org.junit.Assert.fail(Assert.java:88)
>   at org.junit.Assert.failNotEquals(Assert.java:743)
>   at org.junit.Assert.assertEquals(Assert.java:118)
>   at org.junit.Assert.assertEquals(Assert.java:555)
>   at 
> org.apache.hadoop.hbase.security.visibility.TestVisibilityLabels.testAddVisibilityLabelsOnRSRestart(TestVisibilityLabels.java:408)
> ...
> testClearUserAuths(org.apache.hadoop.hbase.security.visibility.TestVisibilityLabels)
>   Time elapsed: 0.002 sec  <<< FAILURE!
> java.lang.AssertionError
>   at org.junit.Assert.fail(Assert.java:86)
>   at org.junit.Assert.assertTrue(Assert.java:41)
>   at org.junit.Assert.assertTrue(Assert.java:52)
>   at 
> org.apache.hadoop.hbase.security.visibility.TestVisibilityLabels.testClearUserAuths(TestVisibilityLabels.java:505)
> {code}
> Logs to be attached



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to