From 97e57508545c37c1595c5e232e2634c5fd76f2b9 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Tue, 24 Dec 2024 09:50:37 +0000 Subject: [PATCH] Add GQLSTATUS code to Neo. code (#2008) --- .../authentication-authorization/database-administration.adoc | 2 +- .../aliases/manage-aliases-composite-databases.adoc | 4 ++++ .../ROOT/pages/database-internals/concurrent-data-access.adoc | 1 + 3 files changed, 6 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..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 @@ -120,6 +120,8 @@ CREATE ALIAS yard FOR DATABASE garden Failed to create the specified database alias 'yard': Database 'garden' is composite. ---- +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. @@ -354,6 +356,8 @@ DROP ALIAS $aliasname FOR DATABASE Failed to delete 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. In these cases, it is recommended to avoid parameters and explicitly quote the composite database name and alias name separately to avoid ambiguity. diff --git a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc index 4779d1b46..e7a61a65a 100644 --- a/modules/ROOT/pages/database-internals/concurrent-data-access.adoc +++ b/modules/ROOT/pages/database-internals/concurrent-data-access.adoc @@ -295,6 +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.` 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.