Skip to content

Commit 01f7ef0

Browse files
authored
Docs: improve wording around transaction timeout (#970)
* Docs: improve wording around transaction timeout Signed-off-by: Grant Lodge <[email protected]> * Fix capitalization Signed-off-by: Richard Irons <[email protected]> --------- Signed-off-by: Grant Lodge <[email protected]> Signed-off-by: Richard Irons <[email protected]>
1 parent 08fd095 commit 01f7ef0

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

src/neo4j/_async/work/session.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -468,14 +468,15 @@ async def begin_transaction(
468468
the transaction timeout in seconds.
469469
Transactions that execute longer than the configured timeout will
470470
be terminated by the database.
471-
This functionality allows to limit query/transaction execution
472-
time.
473-
The Specified timeout overrides the default timeout configured in
471+
This functionality allows user code to limit query/transaction
472+
execution time.
473+
The specified timeout overrides the default timeout configured in
474474
the database using the ``db.transaction.timeout`` setting
475475
(``dbms.transaction.timeout`` before Neo4j 5.0).
476476
Values higher than ``db.transaction.timeout`` will be ignored and
477-
will fall back to the default for server versions 4.2 to including
478-
5.2. The value should not represent a negative duration.
477+
will fall back to the default for server versions between 4.2 and
478+
5.2 (inclusive).
479+
The value should not represent a negative duration.
479480
A ``0`` duration will make the transaction execute indefinitely.
480481
:data:`None` will use the default timeout configured on the server.
481482

src/neo4j/_sync/work/session.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -468,14 +468,15 @@ def begin_transaction(
468468
the transaction timeout in seconds.
469469
Transactions that execute longer than the configured timeout will
470470
be terminated by the database.
471-
This functionality allows to limit query/transaction execution
472-
time.
473-
The Specified timeout overrides the default timeout configured in
471+
This functionality allows user code to limit query/transaction
472+
execution time.
473+
The specified timeout overrides the default timeout configured in
474474
the database using the ``db.transaction.timeout`` setting
475475
(``dbms.transaction.timeout`` before Neo4j 5.0).
476476
Values higher than ``db.transaction.timeout`` will be ignored and
477-
will fall back to the default for server versions 4.2 to including
478-
5.2. The value should not represent a negative duration.
477+
will fall back to the default for server versions between 4.2 and
478+
5.2 (inclusive).
479+
The value should not represent a negative duration.
479480
A ``0`` duration will make the transaction execute indefinitely.
480481
:data:`None` will use the default timeout configured on the server.
481482

src/neo4j/_work/query.py

+12-10
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ class Query:
5151
the transaction timeout in seconds.
5252
Transactions that execute longer than the configured timeout will
5353
be terminated by the database.
54-
This functionality allows to limit query/transaction execution
55-
time.
56-
The Specified timeout overrides the default timeout configured in
54+
This functionality allows user code to limit query/transaction
55+
execution time.
56+
The specified timeout overrides the default timeout configured in
5757
the database using the ``db.transaction.timeout`` setting
5858
(``dbms.transaction.timeout`` before Neo4j 5.0).
5959
Values higher than ``db.transaction.timeout`` will be ignored and
60-
will fall back to the default for server versions 4.2 to including
61-
5.2. The value should not represent a negative duration.
60+
will fall back to the default for server versions between 4.2 and
61+
5.2 (inclusive).
62+
The value should not represent a negative duration.
6263
A ``0`` duration will make the transaction execute indefinitely.
6364
:data:`None` will use the default timeout configured on the server.
6465
:type timeout: float | None
@@ -114,14 +115,15 @@ def count_people_tx(tx):
114115
the transaction timeout in seconds.
115116
Transactions that execute longer than the configured timeout will
116117
be terminated by the database.
117-
This functionality allows to limit query/transaction execution
118-
time.
119-
The Specified timeout overrides the default timeout configured in
118+
This functionality allows user code to limit query/transaction
119+
execution time.
120+
The specified timeout overrides the default timeout configured in
120121
the database using the ``db.transaction.timeout`` setting
121122
(``dbms.transaction.timeout`` before Neo4j 5.0).
122123
Values higher than ``db.transaction.timeout`` will be ignored and
123-
will fall back to the default for server versions 4.2 to including
124-
5.2. The value should not represent a negative duration.
124+
will fall back to the default for server versions between 4.2 and
125+
5.2 (inclusive).
126+
The value should not represent a negative duration.
125127
A ``0`` duration will make the transaction execute indefinitely.
126128
:data:`None` will use the default timeout configured on the server.
127129
:type timeout: float | None

0 commit comments

Comments
 (0)