Skip to content

Commit 79f2ce2

Browse files
authored
Improve transaction timeout docs (#1486)
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`.
1 parent 198adcc commit 79f2ce2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

driver/src/main/java/org/neo4j/driver/TransactionConfig.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ private Builder() {}
174174
* Set the transaction timeout. Transactions that execute longer than the configured timeout will be terminated by the database.
175175
* See also {@link #withDefaultTimeout}.
176176
* <p>
177-
* This functionality allows to limit query/transaction execution time. Specified timeout overrides the default timeout configured in the database
178-
* using {@code dbms.transaction.timeout} setting.
177+
* This functionality allows to limit query/transaction execution time.
178+
* 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).
179+
* 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.
179180
* <p>
180-
* Provided value should not represent a negative duration.
181+
* The provided value should not represent a negative duration.
182+
* {@link Duration#ZERO} will make the transaction execute indefinitely.
181183
*
182184
* @param timeout the timeout.
183185
* @return this builder.

0 commit comments

Comments
 (0)