ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Ricky <mhx8...@gmail.com>
Subject Re: Review Request 72645: RANGER-2895: Replace c3p0 connection pool with HikariCP, upgrading MySQL connector and Eclipselink
Date Wed, 15 Jul 2020 16:44:35 GMT


> On 七月 6, 2020, 3:56 a.m., Pradeep Agrawal wrote:
> > I would like you to test this patch in all other db flavors ranger is supported.
They are Mysql, oracle, postgres, sqlanywhere, microsoft sqlserver
> 
> Bill Ricky wrote:
>     It took me some time to install all other kinds of databases. All tests are ok. HikariCP
and EclipseLink work fine with all the databases above.
> 
> Dhaval Shah wrote:
>     With MS-SQL I am facing below issue
>     
>     ERROR:
>     
>     [EL Warning]: 2020-07-15 09:36:45.141--ClientSession(1017793925)--Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.7.7.v20200504-69f2c2b80d): org.eclipse.persistence.exceptions.DatabaseException
>     Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object
name 'x_service_config_def_SEQ'.
>     Error Code: 208
>     Call: SELECT NEXT VALUE FOR x_service_config_def_SEQ
>     Query: ValueReadQuery(sql="SELECT NEXT VALUE FOR x_service_config_def_SEQ")
>     Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object
name 'X_USER_SEQ'.
>     Error Code: 208
>     Call: SELECT NEXT VALUE FOR X_USER_SEQ
>     Query: ValueReadQuery(sql="SELECT NEXT VALUE FOR X_USER_SEQ")
>     [EL Warning]: 2020-07-15 09:37:03.071--ClientSession(1469107147)--Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.7.7.v20200504-69f2c2b80d): org.eclipse.persistence.exceptions.DatabaseException
>     Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object
name 'X_TRX_LOG_SEQ'.
>     Error Code: 208
>     Call: SELECT NEXT VALUE FOR X_TRX_LOG_SEQ
>     Query: ValueReadQuery(sql="SELECT NEXT VALUE FOR X_TRX_LOG_SEQ")
>     
>     Seems that its due to eclipselink-2.7.7.jar
>     
>     Thanks
> 
> Pradeep Agrawal wrote:
>     @Ricky: With Which all DB you tested ? It will not work with MS SQL Server.
>     refer : http://eclipse.1072660.n5.nabble.com/Getting-Exception-EclipseLink-4002-on-EclipseLink-2-6-0-or-higher-while-same-code-working-fine-with-2-td181386.html

I found out that I only tested HikariCP. Sorry, that was my mistake. I thought I've tested
them both, but I did not. As you said, if newest EclipseLink does not work well with MS SQL
Server, I think only replacing c3p0 with HikariCP will be enough for most of the cases. I'll
change the code, and it will be simpler.
As newest HikariCP and EclipseLink work really well with MySQL, our production environment
already applied this patch weeks ago, And till now everything runs smoothly.(We encountered
some problems using c3p0, like c3p0 deadlocks, too many connections error, performance issues
when the throughput is large. We encountered some problems using EclipseLink too, like OOM
when the throughput is large. We analyzed the memory dump file, and it showed that EclipseLink
JPA created the most objects which finally caused OOM, etc. And all the issues have gone after
we start using HikariCP and newest EclipseLink.)

BTW, I think it will be a good choice to replace EclipseLink with Hibernate or Spring Boot
Jpa in the near future :)


- Bill


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


On 七月 5, 2020, 7:15 p.m., Bill Ricky wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72645/
> -----------------------------------------------------------
> 
> (Updated 七月 5, 2020, 7:15 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2895
>     https://issues.apache.org/jira/browse/RANGER-2895
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> We should replace c3p0 with [HikariCP|https://github.com/brettwooldridge/HikariCP]. HikariCP
is much faster and less error prone. HikariCP is more popular with 13.2k+ stars on its github.
There were no more new commits since Nov 18, 2019 in [c3p0|https://github.com/swaldman/c3p0/commits/master].
> 
> [MySQL connector|https://github.com/mysql/mysql-connector-j] and [Eclipselink|https://github.com/eclipse-ee4j/eclipselink]
should be upgraded to the latest stable versions as well to include many essential bugfixes.
> 
> 
> Diffs
> -----
> 
>   pom.xml 5bfd08df2 
>   security-admin/pom.xml 745dbfe8c 
>   security-admin/scripts/ranger-admin-site-template.xml 72ff66eaf 
>   security-admin/scripts/setup.sh 949c24244 
>   security-admin/scripts/upgrade_admin.py 10fa485bd 
>   security-admin/src/main/resources/conf.dist/ranger-admin-default-site.xml fcd4bd0ee

>   security-admin/src/main/webapp/META-INF/applicationContext.xml b24f4d4ac 
> 
> 
> Diff: https://reviews.apache.org/r/72645/diff/1/
> 
> 
> Testing
> -------
> 
> 1.Compilation OK
> 2.Already used in production environment
> 
> 
> Thanks,
> 
> Bill Ricky
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message