You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Abhay Kulkarni <ak...@hortonworks.com> on 2021/06/15 22:48:35 UTC

Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

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

Review request for ranger, Harshal Chavan, 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/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/1/


Testing
-------

Passed on unit tests.


Thanks,

Abhay Kulkarni


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Abhay Kulkarni <ak...@hortonworks.com>.

> On June 16, 2021, 12:17 p.m., Kishor Gollapalliwar wrote:
> > security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql
> > Line 1563 (original), 1563 (patched)
> > <https://reviews.apache.org/r/73425/diff/1/?file=2250921#file2250921line1563>
> >
> >     There is a DAO method XXServiceResourceDao#findByServiceAndResourceSignature(serviceId, resourceSignature) in admin, which expects there will be only ONE entry/ row for serviceId + resourceSignature combination. Please consider providing composite unique key (serviceId + resourceSignature) or update DAO method to return multiple XXServiceResource.

Accepted. Out of two suggestions, building a unique composite key (service_id + resource_signature) on x_service_resource table is a better, as the lookup of x_service_resource table involving resource_signature column also includes service-id column.


- Abhay


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


On June 15, 2021, 10:48 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73425/
> -----------------------------------------------------------
> 
> (Updated June 15, 2021, 10:48 p.m.)
> 
> 
> Review request for ranger, Harshal Chavan, 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/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/1/
> 
> 
> Testing
> -------
> 
> Passed on unit tests.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Kishor Gollapalliwar <ki...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/#review223163
-----------------------------------------------------------




security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql
Line 1563 (original), 1563 (patched)
<https://reviews.apache.org/r/73425/#comment312266>

    There is a DAO method XXServiceResourceDao#findByServiceAndResourceSignature(serviceId, resourceSignature) in admin, which expects there will be only ONE entry/ row for serviceId + resourceSignature combination. Please consider providing composite unique key (serviceId + resourceSignature) or update DAO method to return multiple XXServiceResource.


- Kishor Gollapalliwar


On June 15, 2021, 10:48 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73425/
> -----------------------------------------------------------
> 
> (Updated June 15, 2021, 10:48 p.m.)
> 
> 
> Review request for ranger, Harshal Chavan, 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/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/1/
> 
> 
> Testing
> -------
> 
> Passed on unit tests.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Pradeep Agrawal <pr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/#review223157
-----------------------------------------------------------


Ship it!




Ship It!

- Pradeep Agrawal


On June 15, 2021, 10:48 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73425/
> -----------------------------------------------------------
> 
> (Updated June 15, 2021, 10:48 p.m.)
> 
> 
> Review request for ranger, Harshal Chavan, 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/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/1/
> 
> 
> Testing
> -------
> 
> Passed on unit tests.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Pradeep Agrawal <pr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/#review223165
-----------------------------------------------------------


Ship it!




Ship It!

- Pradeep Agrawal


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
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Abhay Kulkarni <ak...@hortonworks.com>.

> 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
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Kishor Gollapalliwar <ki...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/#review223169
-----------------------------------------------------------




security-admin/db/mysql/patches/051-create-index-for-service-resource.sql
Line 20 (original), 20 (patched)
<https://reviews.apache.org/r/73425/#comment312268>

    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


- Kishor Gollapalliwar


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
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Pradeep Agrawal <pr...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/#review223177
-----------------------------------------------------------


Ship it!




Ship It!

- Pradeep Agrawal


On June 22, 2021, 2:01 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73425/
> -----------------------------------------------------------
> 
> (Updated June 22, 2021, 2:01 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/050-create-index-for-resource-signature.sql f4b60bd63 
>   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 
>   security-admin/db/sqlserver/patches/053-add-unique-constraint-on-change-logs.sql f3b570991 
>   security-admin/db/sqlserver/patches/054-add-version-in-x_service_version_info.sql d72d63297 
> 
> 
> Diff: https://reviews.apache.org/r/73425/diff/5/
> 
> 
> Testing
> -------
> 
> Passed on unit tests.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/
-----------------------------------------------------------

(Updated June 22, 2021, 2:01 p.m.)


Review request for ranger, Harshal Chavan, Kishor Gollapalliwar, Mehul Parikh, and Pradeep Agrawal.


Changes
-------

Fixed upgrade issues


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

  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/050-create-index-for-resource-signature.sql f4b60bd63 
  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 
  security-admin/db/sqlserver/patches/053-add-unique-constraint-on-change-logs.sql f3b570991 
  security-admin/db/sqlserver/patches/054-add-version-in-x_service_version_info.sql d72d63297 


Diff: https://reviews.apache.org/r/73425/diff/5/

Changes: https://reviews.apache.org/r/73425/diff/4-5/


Testing
-------

Passed on unit tests.


Thanks,

Abhay Kulkarni


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Ramesh Mani <rm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/#review223172
-----------------------------------------------------------


Ship it!




Ship It!

- Ramesh Mani


On June 16, 2021, 10:29 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, 10:29 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/4/
> 
> 
> Testing
> -------
> 
> Passed on unit tests.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/
-----------------------------------------------------------

(Updated June 16, 2021, 10:29 p.m.)


Review request for ranger, Harshal Chavan, Kishor Gollapalliwar, Mehul Parikh, and Pradeep Agrawal.


Changes
-------

Fixed 'drop index' commands.


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

  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/4/

Changes: https://reviews.apache.org/r/73425/diff/3-4/


Testing
-------

Passed on unit tests.


Thanks,

Abhay Kulkarni


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/
-----------------------------------------------------------

(Updated June 16, 2021, 5:44 p.m.)


Review request for ranger, Harshal Chavan, Kishor Gollapalliwar, Mehul Parikh, and Pradeep Agrawal.


Changes
-------

Addressed review comment


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

  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/3/

Changes: https://reviews.apache.org/r/73425/diff/2-3/


Testing
-------

Passed on unit tests.


Thanks,

Abhay Kulkarni


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73425/#review223170
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


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
> 
>


Re: Review Request 73425: RANGER-3320: ranger tags are not added for when tagging identically named database/tables in two different Ranger services

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
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.


Changes
-------

Addressed review comment


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

  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/

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


Testing
-------

Passed on unit tests.


Thanks,

Abhay Kulkarni