You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Pradeep Agrawal <pr...@freestoneinfotech.com> on 2016/09/12 16:01:24 UTC

Review Request 51812: RANGER-1173 : Improve Ranger database schema import logic and make it more robust

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

Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.


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


Repository: ranger


Description
-------

**Problem Statement: ** Ranger installation process should handle concurrent import of DB schema as concurrent execution of db schema files can lead to an inconsistent state of data and application.

**Proposed Solution: ** Before importing db schema file; installation process will insert status in x_db_version_h table with active='N' value. If schema will get created/imported successfully then status of the schema creation flag will be set to 'Y' else status row from x_db_version_h will be deleted. If the Ranger DB schema is being imported then the active column will have the value 'N' and no other process will be allowed to import that file.


Diffs
-----

  security-admin/db/oracle/create_dbversion_catalog.sql 0017748 
  security-admin/db/oracle/xa_core_db_oracle.sql 2ede810 
  security-admin/scripts/db_setup.py a2b26f5 

Diff: https://reviews.apache.org/r/51812/diff/


Testing
-------

**Steps Performed (With Patch) :**

After configuring values in install.properties file, called setup.sh from different terminals.

**Result Behaviour :**
Ranger Was installed successfully and was able to login in Ranger Admin UI.

Note: Patch has been tested for all DB flavors.


Thanks,

Pradeep Agrawal


Re: Review Request 51812: RANGER-1173 : Improve Ranger database schema import logic and make it more robust

Posted by Velmurugan Periasamy <vp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51812/#review148724
-----------------------------------------------------------


Ship it!




Ship It!

- Velmurugan Periasamy


On Sept. 13, 2016, 9:30 a.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51812/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2016, 9:30 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1173
>     https://issues.apache.org/jira/browse/RANGER-1173
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement: ** Ranger installation process should handle concurrent import of DB schema as concurrent execution of db schema files can lead to an inconsistent state of data and application.
> 
> **Proposed Solution: ** Before importing db schema file; installation process will insert status in x_db_version_h table with active='N' value. If schema will get created/imported successfully then status of the schema creation flag will be set to 'Y' else status row from x_db_version_h will be deleted. If the Ranger DB schema is being imported then the active column will have the value 'N' and no other process will be allowed to import that file.
> 
> 
> Diffs
> -----
> 
>   security-admin/db/oracle/create_dbversion_catalog.sql 0017748 
>   security-admin/db/oracle/xa_core_db_oracle.sql 2ede810 
>   security-admin/scripts/db_setup.py a2b26f5 
> 
> Diff: https://reviews.apache.org/r/51812/diff/
> 
> 
> Testing
> -------
> 
> **Steps Performed (With Patch) :**
> 
> After configuring values in install.properties file, called setup.sh from different terminals.
> 
> **Result Behaviour :**
> Ranger Was installed successfully and was able to login in Ranger Admin UI.
> 
> Note: Patch has been tested for all DB flavors.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 51812: RANGER-1173 : Improve Ranger database schema import logic and make it more robust

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

(Updated Sept. 13, 2016, 9:30 a.m.)


Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, and Velmurugan Periasamy.


Changes
-------

Updated patch to handle failure possibilities of creation of version history table.


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


Repository: ranger


Description
-------

**Problem Statement: ** Ranger installation process should handle concurrent import of DB schema as concurrent execution of db schema files can lead to an inconsistent state of data and application.

**Proposed Solution: ** Before importing db schema file; installation process will insert status in x_db_version_h table with active='N' value. If schema will get created/imported successfully then status of the schema creation flag will be set to 'Y' else status row from x_db_version_h will be deleted. If the Ranger DB schema is being imported then the active column will have the value 'N' and no other process will be allowed to import that file.


Diffs (updated)
-----

  security-admin/db/oracle/create_dbversion_catalog.sql 0017748 
  security-admin/db/oracle/xa_core_db_oracle.sql 2ede810 
  security-admin/scripts/db_setup.py a2b26f5 

Diff: https://reviews.apache.org/r/51812/diff/


Testing
-------

**Steps Performed (With Patch) :**

After configuring values in install.properties file, called setup.sh from different terminals.

**Result Behaviour :**
Ranger Was installed successfully and was able to login in Ranger Admin UI.

Note: Patch has been tested for all DB flavors.


Thanks,

Pradeep Agrawal