From 8666efa62e4a8c6d60581a5dc206e549426a6bdf Mon Sep 17 00:00:00 2001 From: Rouven Bauer Date: Wed, 27 Sep 2023 09:58:09 +0200 Subject: [PATCH 1/3] Docs: improve wording around transaction timeout Signed-off-by: Grant Lodge <6323995+thelonelyvulpes@users.noreply.github.com> --- src/neo4j/_async/work/session.py | 9 +++++---- src/neo4j/_sync/work/session.py | 9 +++++---- src/neo4j/_work/query.py | 18 ++++++++++-------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/neo4j/_async/work/session.py b/src/neo4j/_async/work/session.py index 51610e1da..8abe914f3 100644 --- a/src/neo4j/_async/work/session.py +++ b/src/neo4j/_async/work/session.py @@ -468,14 +468,15 @@ async def begin_transaction( the transaction timeout in seconds. Transactions that execute longer than the configured timeout will be terminated by the database. - This functionality allows to limit query/transaction execution - time. + This functionality allows user code to limit query/transaction + execution time. The Specified timeout overrides the default timeout configured in the database using the ``db.transaction.timeout`` setting (``dbms.transaction.timeout`` before Neo4j 5.0). Values higher than ``db.transaction.timeout`` will be ignored and - will fall back to the default for server versions 4.2 to including - 5.2. The value should not represent a negative duration. + will fall back to the default for server versions between 4.2 and + 5.2 (inclusive). + The value should not represent a negative duration. A ``0`` duration will make the transaction execute indefinitely. :data:`None` will use the default timeout configured on the server. diff --git a/src/neo4j/_sync/work/session.py b/src/neo4j/_sync/work/session.py index a0217662a..59eed4240 100644 --- a/src/neo4j/_sync/work/session.py +++ b/src/neo4j/_sync/work/session.py @@ -468,14 +468,15 @@ def begin_transaction( the transaction timeout in seconds. Transactions that execute longer than the configured timeout will be terminated by the database. - This functionality allows to limit query/transaction execution - time. + This functionality allows user code to limit query/transaction + execution time. The Specified timeout overrides the default timeout configured in the database using the ``db.transaction.timeout`` setting (``dbms.transaction.timeout`` before Neo4j 5.0). Values higher than ``db.transaction.timeout`` will be ignored and - will fall back to the default for server versions 4.2 to including - 5.2. The value should not represent a negative duration. + will fall back to the default for server versions between 4.2 and + 5.2 (inclusive). + The value should not represent a negative duration. A ``0`` duration will make the transaction execute indefinitely. :data:`None` will use the default timeout configured on the server. diff --git a/src/neo4j/_work/query.py b/src/neo4j/_work/query.py index addb3aba6..b187d89a6 100644 --- a/src/neo4j/_work/query.py +++ b/src/neo4j/_work/query.py @@ -51,14 +51,15 @@ class Query: the transaction timeout in seconds. Transactions that execute longer than the configured timeout will be terminated by the database. - This functionality allows to limit query/transaction execution - time. + This functionality allows user code to limit query/transaction + execution time. The Specified timeout overrides the default timeout configured in the database using the ``db.transaction.timeout`` setting (``dbms.transaction.timeout`` before Neo4j 5.0). Values higher than ``db.transaction.timeout`` will be ignored and - will fall back to the default for server versions 4.2 to including - 5.2. The value should not represent a negative duration. + will fall back to the default for server versions between 4.2 and + 5.2 (inclusive). + The value should not represent a negative duration. A ``0`` duration will make the transaction execute indefinitely. :data:`None` will use the default timeout configured on the server. :type timeout: float | None @@ -114,14 +115,15 @@ def count_people_tx(tx): the transaction timeout in seconds. Transactions that execute longer than the configured timeout will be terminated by the database. - This functionality allows to limit query/transaction execution - time. + This functionality allows user code to limit query/transaction + execution time. The Specified timeout overrides the default timeout configured in the database using the ``db.transaction.timeout`` setting (``dbms.transaction.timeout`` before Neo4j 5.0). Values higher than ``db.transaction.timeout`` will be ignored and - will fall back to the default for server versions 4.2 to including - 5.2. The value should not represent a negative duration. + will fall back to the default for server versions between 4.2 and + 5.2 (inclusive). + The value should not represent a negative duration. A ``0`` duration will make the transaction execute indefinitely. :data:`None` will use the default timeout configured on the server. :type timeout: float | None From 905abf62ecbb4911a83b9737a6850c1e764cebd4 Mon Sep 17 00:00:00 2001 From: Rouven Bauer Date: Wed, 27 Sep 2023 12:08:30 +0200 Subject: [PATCH 2/3] Fix capitalization Signed-off-by: Richard Irons <115992270+RichardIrons-neo4j@users.noreply.github.com> --- src/neo4j/_async/work/session.py | 2 +- src/neo4j/_work/query.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/neo4j/_async/work/session.py b/src/neo4j/_async/work/session.py index 8abe914f3..fb3233157 100644 --- a/src/neo4j/_async/work/session.py +++ b/src/neo4j/_async/work/session.py @@ -470,7 +470,7 @@ async def begin_transaction( be terminated by the database. This functionality allows user code to limit query/transaction execution time. - The Specified timeout overrides the default timeout configured in + The specified timeout overrides the default timeout configured in the database using the ``db.transaction.timeout`` setting (``dbms.transaction.timeout`` before Neo4j 5.0). Values higher than ``db.transaction.timeout`` will be ignored and diff --git a/src/neo4j/_work/query.py b/src/neo4j/_work/query.py index b187d89a6..b54df2284 100644 --- a/src/neo4j/_work/query.py +++ b/src/neo4j/_work/query.py @@ -53,7 +53,7 @@ class Query: be terminated by the database. This functionality allows user code to limit query/transaction execution time. - The Specified timeout overrides the default timeout configured in + The specified timeout overrides the default timeout configured in the database using the ``db.transaction.timeout`` setting (``dbms.transaction.timeout`` before Neo4j 5.0). Values higher than ``db.transaction.timeout`` will be ignored and @@ -117,7 +117,7 @@ def count_people_tx(tx): be terminated by the database. This functionality allows user code to limit query/transaction execution time. - The Specified timeout overrides the default timeout configured in + The specified timeout overrides the default timeout configured in the database using the ``db.transaction.timeout`` setting (``dbms.transaction.timeout`` before Neo4j 5.0). Values higher than ``db.transaction.timeout`` will be ignored and From c8624b36f1501701b136f0bd1f47a496bed5f43f Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Wed, 27 Sep 2023 12:49:47 +0200 Subject: [PATCH 3/3] Fix docs in sync code as well --- src/neo4j/_sync/work/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neo4j/_sync/work/session.py b/src/neo4j/_sync/work/session.py index 59eed4240..8869078bf 100644 --- a/src/neo4j/_sync/work/session.py +++ b/src/neo4j/_sync/work/session.py @@ -470,7 +470,7 @@ def begin_transaction( be terminated by the database. This functionality allows user code to limit query/transaction execution time. - The Specified timeout overrides the default timeout configured in + The specified timeout overrides the default timeout configured in the database using the ``db.transaction.timeout`` setting (``dbms.transaction.timeout`` before Neo4j 5.0). Values higher than ``db.transaction.timeout`` will be ignored and