> On June 16, 2021, 4:04 p.m., Kishor Gollapalliwar wrote: > > security-admin/db/mysql/patches/051-create-index-for-service-resource.sql > > Line 20 (original), 20 (patched) > > <https://reviews.apache.org/r/73425/diff/2/?file=2250939#file2250939line20> > > > > If index name x_service_resource_IDX_resource_signature already exists > > with single column only, we should drop it as well.Consider making logical > > change simillar to follows. > > > > If (INDEX EXISTS) { > > DROP INDEX > > } > > CREATE INDEX
Accepted. - Abhay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73425/#review223169 ----------------------------------------------------------- On June 16, 2021, 2:27 p.m., Abhay Kulkarni wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73425/ > ----------------------------------------------------------- > > (Updated June 16, 2021, 2:27 p.m.) > > > Review request for ranger, Harshal Chavan, Kishor Gollapalliwar, Mehul > Parikh, and Pradeep Agrawal. > > > Bugs: RANGER-3320 > https://issues.apache.org/jira/browse/RANGER-3320 > > > Repository: ranger > > > Description > ------- > > Test scenario: > > 1. There are two hive services managed by Ranger, each corresponding to a > different Hive warehouse. > > 2. The names of database and tables created in each warehouse are exactly the > same. > > 3. Corresponding entities in Atlas are tagged with some classification. > > Then only one of the entities is shown as tagged in Ranger. > > The root cause is that these two resources have exactly identical > resource_signature which is a uniquely indexed column in x_service_resource > table. Only one of the resource can get created due to this constraint. > > This patch makes the resource_signature column indexed but not unique. > > > Diffs > ----- > > security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql > 2024e6217 > security-admin/db/mysql/patches/051-create-index-for-service-resource.sql > 73dc7c3b2 > security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql > d2c4f27e3 > security-admin/db/oracle/patches/051-create-index-for-service-resource.sql > ac1871e5e > security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql > 0feeb23d0 > > security-admin/db/postgres/patches/051-create-index-for-service-resource.sql > c43244570 > > security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql > 0ea76b96c > > security-admin/db/sqlanywhere/patches/051-create-index-for-service-resource.sql > d6f5ddbe9 > security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql > 4eaa77c52 > > security-admin/db/sqlserver/patches/052-create-index-for-service-resource.sql > 301aa42e0 > > > Diff: https://reviews.apache.org/r/73425/diff/2/ > > > Testing > ------- > > Passed on unit tests. > > > Thanks, > > Abhay Kulkarni > >