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

Review request for ranger, Dineshkumar Yadav, Abhay Kulkarni, Madhan Neethiraj, 
Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.


Bugs: RANGER-3435
    https://issues.apache.org/jira/browse/RANGER-3435


Repository: ranger


Description
-------

**Problem Statement:** After first commit of RANGER-3435 
https://reviews.apache.org/r/73594/  x_policy table have unique constraint on 
guid and service column. if there are more than one zone and policies exported 
from one zone is imported in the other zone then policy guid will remain same. 
since guid are same for both the policies, we need to restrict 1 entry only for 
the same guid under a specific service and zone.

**Proposed Solution:**
it will be better to include zone_id also with guid and service column for the 
unique key creation so that the same restriction can be enforced from db end.


Diffs
-----

  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 9e2892a1c 
  
security-admin/db/mysql/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
 357b7efe3 
  security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
65f9ad2f6 
  
security-admin/db/oracle/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
 580841c6b 
  security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
a5bcf488b 
  
security-admin/db/postgres/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
 81718aae4 
  
security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql 
a48f2348c 
  
security-admin/db/sqlanywhere/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
 16ad476e4 
  security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
5cbe6d5a7 
  
security-admin/db/sqlserver/patches/057-add-unique-constraint-on-x_policy-table-guid-service-column.sql
 3037988e2 


Diff: https://reviews.apache.org/r/73719/diff/1/


Testing
-------

Tested the patch for MySQL, Oracle, Postgres and MSSQL.
unique constraint is being created in x_policy table for a fresh installation 
and upgrade case as well.


Thanks,

Pradeep Agrawal

Reply via email to