> On Feb. 21, 2018, 7:01 p.m., kalyan kumar kalvagadda wrote: > > I'm not sure if sentry has a test that performs a table rename and > > immediatly peforms an hive operation that uses the new table name. I did a > > quick search and did not find any. > > If sentry doesn't have them we need to add that e2e test. > > > > Somthing like this > > **Case-1:** > > 1. grant all on db1.tb1 to a role1. > > 2. alter table d1.tb1 rename to d1.tb_new; //Changing the name of the table. > > 3. perform "select * from d1.tb_new" as role1 and make sure that that > > authorization is granted. > > > > **Case-2:** > > 1. grant all on db1.tb1 to a role1. > > 2. alter table d1.tb1 rename to d2.tb1; //Moving table from another > > database to another. > > 3. perform "select * from d2.tb1" as role1 and make sure that that > > authorization is granted.
we do have such test TestDbPrivilegeCleanupOnDrop.testRenameTables. Since it renames four tables at once, the delay may be long enough for it to always works. I can add a test case only rename single table and access privilege of old and new tables right after. - Na ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65704/#review197995 ----------------------------------------------------------- On Feb. 21, 2018, 4:52 p.m., Na Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65704/ > ----------------------------------------------------------- > > (Updated Feb. 21, 2018, 4:52 p.m.) > > > Review request for sentry, Alexander Kolbasov, kalyan kumar kalvagadda, and > Sergio Pena. > > > Repository: sentry > > > Description > ------- > > wait for HMS sync at alter table, which including table rename and changing > table columns > > > Diffs > ----- > > > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/metastore/SentrySyncHMSNotificationsPostEventListener.java > 24d7763 > > sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hdfs/TestHDFSIntegrationBase.java > 4cd00e6 > > > Diff: https://reviews.apache.org/r/65704/diff/2/ > > > Testing > ------- > > unit tests succeeded > > > Thanks, > > Na Li > >