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

(Updated Nov. 24, 2021, 3:44 p.m.)


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


Changes
-------

rebased the patch


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 (updated)
-----

  security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql e444e78eb 
  
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 
9e5da70fc 
  
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 
9fd45037b 
  
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 
bdccecc19 
  
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 
8515ac0b0 
  
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/2/

Changes: https://reviews.apache.org/r/73719/diff/1-2/


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