Closed rjbaucells closed 1 year ago
Thanks for the report, we'll have a look ASAP.
@rjbaucells thank you so much for opening the issue! The JDBC Driver is designed that way because creating a Driver instance is an expensive operation, so we make the Driver once and then rely on Sessions. Unfortunately, this is the best compromise otherwise using one Driver instance per Connection would kill the performance.
@conker84 I agree with the design, creating a Driver instance per connection is a very expensive operation.
But, there should be a way to let the JDBC driver / Neo4J Java driver know that the application is exiting and the event loop must be terminated.
My specific use case is a process that will execute Liquibase statements against a database, and exit on completion. This process is going to be executed from a build pipeline and because of the process not existing clean, the pipeline is failing. I cannot ignore the failure since a "real" error in the execution must be handled.
An application that is creating the Neo4J Java Driver is in full control and can terminate the event loop (by closing the driver) at program exit. Using the JDBC driver is not possible. That is why I believe it is a BUG in the JDBC driver!
@rjbaucells apologies for the delay, but have you checked the recent version of Liquibase? This uses a simplified, built-in JDBC driver which does not suffer from this issue.
@fbiville Yes, I have tried the new version of Neo4J Liquibase plugin (4.19.X). Having a different problem with this version of Liquibase, so we are using 4.18 until the other issue is solved. We are manually killing the process for now...
@fbiville Yes, I have tried the new version of Neo4J Liquibase plugin (4.19.X). Having a different problem with this version of Liquibase, so we are using 4.18 until the other issue is solved. We are manually killing the process for now...
If you have not opened an issue against Liquibase, please do, I will look into it!
Creating a single JDBC connection with the neo4j jdbc driver leaves the
neo4j-java-driver
Driver event loop running...Threads at
checkpoint #1
Threads at
checkpoint #2
, the Driver event loop threads are running...Threads at
checkpoint #3
, the Driver event loop threads continue running...JDBC driver version:
Running the application with maven exec plugin reports threads are not stopped at program exit: