Skip to content

Commit

Permalink
Improve transaction timeout docs (#1486)
Browse files Browse the repository at this point in the history
The timeout behaves differently on different server versions in respects to
the user being or not being able to overwrite the server timeout with a bigger
value.

Also make sure the docs mention special values like `Duration.ZERO`.
  • Loading branch information
robsdedude committed Sep 25, 2023
1 parent 198adcc commit 79f2ce2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions driver/src/main/java/org/neo4j/driver/TransactionConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,12 @@ private Builder() {}
* Set the transaction timeout. Transactions that execute longer than the configured timeout will be terminated by the database.
* See also {@link #withDefaultTimeout}.
* <p>
* This functionality allows to limit query/transaction execution time. Specified timeout overrides the default timeout configured in the database
* using {@code dbms.transaction.timeout} setting.
* This functionality allows to limit query/transaction execution time.
* The Specified timeout overrides the default timeout configured in the database using the {@code db.transaction.timeout} setting ({@code dbms.transaction.timeout} before Neo4j 5.0).
* Values higher than {@code db.transaction.timeout} will be ignored and will fall back to the default for server versions 4.2 to including 5.2.
* <p>
* Provided value should not represent a negative duration.
* The provided value should not represent a negative duration.
* {@link Duration#ZERO} will make the transaction execute indefinitely.
*
* @param timeout the timeout.
* @return this builder.
Expand Down

0 comments on commit 79f2ce2

Please sign in to comment.