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...@gmail.com> on 2022/04/11 13:19:10 UTC

Review Request 73940: RANGER-3704: remove semicolon from c3P0 preferredTestQuery

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

Review request for ranger, bhavik patel, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.


Repository: ranger


Description
-------

**Problem Statement:** While checking c3p0 debug logs for oracle db flavor found that 'preferredTestQuery' config of c3p0 does not understand sql termination character ; and throws logs. I also suspect that it affectes application performance and connection pool management.

**Proposed statement:** removal of ; from the test connection sql stops the exception logs.


Diffs
-----

  security-admin/scripts/setup.sh 7dc11d8f8 
  security-admin/src/main/resources/conf.dist/logback.xml 997f3bc59 
  security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml e2bfc8fff 


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


Testing
-------

Tested the patch and verfied the c3p0 debug logs with mysql,postgres and oracle db flavor.


Thanks,

Pradeep Agrawal


Re: Review Request 73940: RANGER-3704: remove semicolon from c3P0 preferredTestQuery

Posted by Pradeep Agrawal <pr...@gmail.com>.

> On April 12, 2022, 6:01 a.m., bhavik patel wrote:
> > security-admin/scripts/setup.sh
> > Line 644 (original), 644 (patched)
> > <https://reviews.apache.org/r/73940/diff/1/?file=2267340#file2267340line644>
> >
> >     we can remove this property update/change from here as it's already present in the ranger-admin-default-site.xml

currently we are using "select 1" for mysql/postgres/sqlanywhere/sqlserver flavor but for oracle we have "select 1 from dual", what if different db flavors have different test sqls ? how would you address it for different db flavor without the help of setup.sh ?

The script is generic as it allows to change the test connection sql as per the db flavor. 
if you remove the changes from the setup.sh then you have to manually change in the ranger-admin-default-site.xml each time when you run the setup.sh manually for a different db flavor.

For the dev testing when I use the same setup and test my patch for different db flavors, i don't need to change in the ranger-admin-default-site.xml during each run.


- Pradeep


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


On April 11, 2022, 1:19 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73940/
> -----------------------------------------------------------
> 
> (Updated April 11, 2022, 1:19 p.m.)
> 
> 
> Review request for ranger, bhavik patel, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:** While checking c3p0 debug logs for oracle db flavor found that 'preferredTestQuery' config of c3p0 does not understand sql termination character ; and throws logs. I also suspect that it affectes application performance and connection pool management.
> 
> **Proposed statement:** removal of ; from the test connection sql stops the exception logs.
> 
> 
> Diffs
> -----
> 
>   security-admin/scripts/setup.sh 7dc11d8f8 
>   security-admin/src/main/resources/conf.dist/logback.xml 997f3bc59 
>   security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml e2bfc8fff 
> 
> 
> Diff: https://reviews.apache.org/r/73940/diff/1/
> 
> 
> Testing
> -------
> 
> Tested the patch and verfied the c3p0 debug logs with mysql,postgres and oracle db flavor.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 73940: RANGER-3704: remove semicolon from c3P0 preferredTestQuery

Posted by bhavik patel <bh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73940/#review224301
-----------------------------------------------------------




security-admin/scripts/setup.sh
Line 644 (original), 644 (patched)
<https://reviews.apache.org/r/73940/#comment313155>

    we can remove this property update/change from here as it's already present in the ranger-admin-default-site.xml


- bhavik patel


On April 11, 2022, 1:19 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73940/
> -----------------------------------------------------------
> 
> (Updated April 11, 2022, 1:19 p.m.)
> 
> 
> Review request for ranger, bhavik patel, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:** While checking c3p0 debug logs for oracle db flavor found that 'preferredTestQuery' config of c3p0 does not understand sql termination character ; and throws logs. I also suspect that it affectes application performance and connection pool management.
> 
> **Proposed statement:** removal of ; from the test connection sql stops the exception logs.
> 
> 
> Diffs
> -----
> 
>   security-admin/scripts/setup.sh 7dc11d8f8 
>   security-admin/src/main/resources/conf.dist/logback.xml 997f3bc59 
>   security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml e2bfc8fff 
> 
> 
> Diff: https://reviews.apache.org/r/73940/diff/1/
> 
> 
> Testing
> -------
> 
> Tested the patch and verfied the c3p0 debug logs with mysql,postgres and oracle db flavor.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>


Re: Review Request 73940: RANGER-3704: remove semicolon from c3P0 preferredTestQuery

Posted by bhavik patel <bh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73940/#review224303
-----------------------------------------------------------


Ship it!




Ship It!

- bhavik patel


On April 11, 2022, 1:19 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73940/
> -----------------------------------------------------------
> 
> (Updated April 11, 2022, 1:19 p.m.)
> 
> 
> Review request for ranger, bhavik patel, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:** While checking c3p0 debug logs for oracle db flavor found that 'preferredTestQuery' config of c3p0 does not understand sql termination character ; and throws logs. I also suspect that it affectes application performance and connection pool management.
> 
> **Proposed statement:** removal of ; from the test connection sql stops the exception logs.
> 
> 
> Diffs
> -----
> 
>   security-admin/scripts/setup.sh 7dc11d8f8 
>   security-admin/src/main/resources/conf.dist/logback.xml 997f3bc59 
>   security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml e2bfc8fff 
> 
> 
> Diff: https://reviews.apache.org/r/73940/diff/1/
> 
> 
> Testing
> -------
> 
> Tested the patch and verfied the c3p0 debug logs with mysql,postgres and oracle db flavor.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>