From bada784052e1204b1213e0fac0f20e2f8085a70d Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Wed, 11 Dec 2024 12:12:01 +0000 Subject: [PATCH 1/5] Add GQLSTATUS code to Neo. code --- .../ROOT/pages/database-internals/concurrent-data-access.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc index 4779d1b46..e43520037 100644 --- a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc +++ b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc @@ -295,6 +295,8 @@ Since locks are used, deadlocks can happen. A deadlock occurs when two transactions are blocked by each other because they are attempting to concurrently modify a node or a relationship that is locked by the other transaction. In such a scenario, neither of the transactions will be able to proceed. When Neo4j detects a deadlock, the transaction is terminated with the transient error message code `Neo.TransientError.Transaction.DeadlockDetected`. +From 5.25 onwards, the error also contains the following additional GQLSTATUS code and information along with the Neo4j exception: +`50N05, error: general processing exception - deadlock detected. Deadlock detected while trying to acquire locks. See log for more details.`` All locks acquired by the transaction are still held but will be released when the transaction finishes. Once the locks are released, other transactions that were waiting for locks held by the transaction causing the deadlock can proceed. From 65f463c391131c68cc0fd8f02e9bfe4263ec8739 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Tue, 17 Dec 2024 19:10:07 +0000 Subject: [PATCH 2/5] update two mentions of error codes --- .../authentication-authorization/database-administration.adoc | 2 +- .../aliases/manage-aliases-composite-databases.adoc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/authentication-authorization/database-administration.adoc b/modules/ROOT/pages/authentication-authorization/database-administration.adoc index 3a7e5430a..62888c9ab 100644 --- a/modules/ROOT/pages/authentication-authorization/database-administration.adoc +++ b/modules/ROOT/pages/authentication-authorization/database-administration.adoc @@ -180,7 +180,7 @@ Use `REVOKE` if you want to remove a privilege. Common errors, such as misspellings or attempts to revoke privileges that have not been granted or denied, will lead to notifications. Some of these notifications may be replaced with errors in a future major version of Neo4j. -See link:{neo4j-docs-base-uri}/status-codes/{page-version}/notifications/all-notifications[Status Codes -> Notification codes] for details on notifications. +See link:{neo4j-docs-base-uri}/status-codes/{page-version}/notifications/all-notifications[Status Codes for Errors & Notifications -> Server notifications] for details on notifications. The hierarchy between the different database privileges is shown in the image below. diff --git a/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc b/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc index 6adbef5ee..06c6277cc 100644 --- a/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc +++ b/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc @@ -118,6 +118,8 @@ CREATE ALIAS yard FOR DATABASE garden [source, output, role="noheader"] ---- Failed to create the specified database alias 'yard': Database 'garden' is composite. + +GQLSTATUS 42NA6, error: syntax error or access rule violation - invalid alias target. Aliases are not allowed to target composite databases. ---- == Alter local and remote database aliases in composite databases @@ -353,6 +355,7 @@ DROP ALIAS $aliasname FOR DATABASE ---- Failed to delete the specified database alias 'foo.bar': Database alias does not exist. ---- +//GQLSTATUS 50N00, error: general processing exception - internal error. Internal exception raised { $msgTitle }: Failed to create the specified database alias 'foo.bar'. Database alias does not exist. Had the composite database `foo` not existed, the database alias `foo.bar` would have been dropped. From 6848df5bd856917f68aaa1b6da622623af9c213e Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Tue, 17 Dec 2024 19:16:58 +0000 Subject: [PATCH 3/5] update the format of the GQLSTATUS codes --- .../aliases/manage-aliases-composite-databases.adoc | 5 +++-- .../pages/database-internals/concurrent-data-access.adoc | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc b/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc index 06c6277cc..618740307 100644 --- a/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc +++ b/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc @@ -119,7 +119,7 @@ CREATE ALIAS yard FOR DATABASE garden ---- Failed to create the specified database alias 'yard': Database 'garden' is composite. -GQLSTATUS 42NA6, error: syntax error or access rule violation - invalid alias target. Aliases are not allowed to target composite databases. +42NA6, error: syntax error or access rule violation - invalid alias target. Aliases are not allowed to target composite databases. ---- == Alter local and remote database aliases in composite databases @@ -355,7 +355,8 @@ DROP ALIAS $aliasname FOR DATABASE ---- Failed to delete the specified database alias 'foo.bar': Database alias does not exist. ---- -//GQLSTATUS 50N00, error: general processing exception - internal error. Internal exception raised { $msgTitle }: Failed to create the specified database alias 'foo.bar'. Database alias does not exist. +//"GQLSTATUS": "50N00", +// "statusDescription": "error: general processing exception - internal error. Internal exception raised { $msgTitle }: Failed to create the specified database alias 'foo.bar'. Database alias does not exist." Had the composite database `foo` not existed, the database alias `foo.bar` would have been dropped. diff --git a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc index e43520037..fc3c24651 100644 --- a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc +++ b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc @@ -296,7 +296,11 @@ A deadlock occurs when two transactions are blocked by each other because they a In such a scenario, neither of the transactions will be able to proceed. When Neo4j detects a deadlock, the transaction is terminated with the transient error message code `Neo.TransientError.Transaction.DeadlockDetected`. From 5.25 onwards, the error also contains the following additional GQLSTATUS code and information along with the Neo4j exception: -`50N05, error: general processing exception - deadlock detected. Deadlock detected while trying to acquire locks. See log for more details.`` +[soruce, json, role="noheader"] +---- +"GQLSTATUS": "50N05", + "statusDescription": "error: general processing exception - deadlock detected. Deadlock detected while trying to acquire locks. See log for more details." +---- All locks acquired by the transaction are still held but will be released when the transaction finishes. Once the locks are released, other transactions that were waiting for locks held by the transaction causing the deadlock can proceed. From eb8975a295aa212764d0917b664f94e6364b6426 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Tue, 17 Dec 2024 19:23:41 +0000 Subject: [PATCH 4/5] update the format of the GQLSTATUS codes --- .../aliases/manage-aliases-composite-databases.adoc | 8 ++++---- .../pages/database-internals/concurrent-data-access.adoc | 7 +------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc b/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc index 618740307..49ec0676a 100644 --- a/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc +++ b/modules/ROOT/pages/database-administration/aliases/manage-aliases-composite-databases.adoc @@ -118,10 +118,10 @@ CREATE ALIAS yard FOR DATABASE garden [source, output, role="noheader"] ---- Failed to create the specified database alias 'yard': Database 'garden' is composite. - -42NA6, error: syntax error or access rule violation - invalid alias target. Aliases are not allowed to target composite databases. ---- +From 5.26 onwards, the error message also contains the GQLSTATUS code `42NA6` and the status description `error: syntax error or access rule violation - invalid alias target. Aliases are not allowed to target composite databases.` + == Alter local and remote database aliases in composite databases Local and remote database aliases belonging to a composite database can be altered using the `ALTER ALIAS` command. @@ -355,8 +355,8 @@ DROP ALIAS $aliasname FOR DATABASE ---- Failed to delete the specified database alias 'foo.bar': Database alias does not exist. ---- -//"GQLSTATUS": "50N00", -// "statusDescription": "error: general processing exception - internal error. Internal exception raised { $msgTitle }: Failed to create the specified database alias 'foo.bar'. Database alias does not exist." + +//From 5.26 onwards, the error message also contains the GQLSTATUS code `50N00` and the status description `error: general processing exception - internal error. Internal exception raised { $msgTitle }: Failed to create the specified database alias 'foo.bar'. Database alias does not exist.` Had the composite database `foo` not existed, the database alias `foo.bar` would have been dropped. diff --git a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc index fc3c24651..3d7105a37 100644 --- a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc +++ b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc @@ -295,12 +295,7 @@ Since locks are used, deadlocks can happen. A deadlock occurs when two transactions are blocked by each other because they are attempting to concurrently modify a node or a relationship that is locked by the other transaction. In such a scenario, neither of the transactions will be able to proceed. When Neo4j detects a deadlock, the transaction is terminated with the transient error message code `Neo.TransientError.Transaction.DeadlockDetected`. -From 5.25 onwards, the error also contains the following additional GQLSTATUS code and information along with the Neo4j exception: -[soruce, json, role="noheader"] ----- -"GQLSTATUS": "50N05", - "statusDescription": "error: general processing exception - deadlock detected. Deadlock detected while trying to acquire locks. See log for more details." ----- +From 5.25 onwards, the error message also contains the GQLSTATUS code `50N05` and the status description `error: general processing exception - deadlock detected. Deadlock detected while trying to acquire locks. See log for more details.` along with the Neo4j exception. All locks acquired by the transaction are still held but will be released when the transaction finishes. Once the locks are released, other transactions that were waiting for locks held by the transaction causing the deadlock can proceed. From 1704679e6efbc0bb6652875485f2d2574e4a2529 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Tue, 17 Dec 2024 19:25:53 +0000 Subject: [PATCH 5/5] update the format of the GQLSTATUS codes --- .../ROOT/pages/database-internals/concurrent-data-access.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc index 3d7105a37..e7a61a65a 100644 --- a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc +++ b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc @@ -295,7 +295,7 @@ Since locks are used, deadlocks can happen. A deadlock occurs when two transactions are blocked by each other because they are attempting to concurrently modify a node or a relationship that is locked by the other transaction. In such a scenario, neither of the transactions will be able to proceed. When Neo4j detects a deadlock, the transaction is terminated with the transient error message code `Neo.TransientError.Transaction.DeadlockDetected`. -From 5.25 onwards, the error message also contains the GQLSTATUS code `50N05` and the status description `error: general processing exception - deadlock detected. Deadlock detected while trying to acquire locks. See log for more details.` along with the Neo4j exception. +From 5.25 onwards, the error message also contains the GQLSTATUS code `50N05` and the status description `error: general processing exception - deadlock detected. Deadlock detected while trying to acquire locks. See log for more details.` All locks acquired by the transaction are still held but will be released when the transaction finishes. Once the locks are released, other transactions that were waiting for locks held by the transaction causing the deadlock can proceed.