michael-simons / neo4j-migrations

Automated script runner aka "Migrations" for Neo4j. Inspired by Flyway.
https://michael-simons.github.io/neo4j-migrations/
Apache License 2.0
118 stars 24 forks source link

Specify timeout #1428

Closed David-Giliotti-Wonder closed 3 months ago

David-Giliotti-Wonder commented 3 months ago

Hello, we are having an issue where a migration we are running needs us to increase the timeout limit. Is there a way we specify the timeout when we run migrations?

michael-simons commented 3 months ago

Hello, which timeout limit? Migrations does not have one on its own.

The driver has a various but that’s up to you what you configure there, we don’t (and actually can’t) reconfigure it.

For the transaction itself we use transaction functions, don’t know from the top of my head if that is configurable. If so, we can add an option. Will have a look later this week.

also the database itself has transaction timeouts.

David-Giliotti-Wonder commented 3 months ago

Yes, sorry, I'm looking for a way to configure the transaction timeouts. Really appreciate your help, please let me know what you discover when you get a chance. Thanks!

michael-simons commented 3 months ago

@all-contributors add @David-Giliotti-Wonder for ideas

allcontributors[bot] commented 3 months ago

@michael-simons

I've put up a pull request to add @David-Giliotti-Wonder! :tada:

michael-simons commented 3 months ago

Hej. I added this feature, and you can see it here using the core api, but all of it is configurable from within Spring Boot, Quarkus or CLI properties too.

https://github.com/michael-simons/neo4j-migrations/blob/4bb9d64a14039f585e9d2298112615c5414132a0/neo4j-migrations-core/src/test/java/ac/simons/neo4j/migrations/core/MigrationsIT.java#L850-L879

Here's the script that will be timed out https://github.com/michael-simons/neo4j-migrations/blob/4bb9d64a14039f585e9d2298112615c5414132a0/neo4j-migrations-test-resources/src/main/resources/sleepy/V001__Sleep.cypher

Release will be early next week. Cheers, and thanks for your input.

David-Giliotti-Wonder commented 3 months ago

Thank you!