From 07d29bfac2a7ec06c7f227fe299983d1eb85f09d Mon Sep 17 00:00:00 2001 From: Lasse Heemann Date: Wed, 4 Dec 2024 12:35:22 +0100 Subject: [PATCH 01/13] Add notifications for WAIT commands --- modules/ROOT/pages/changelogs.adoc | 11 + .../notifications/all-notifications.adoc | 306 ++++++++++++++++++ 2 files changed, 317 insertions(+) diff --git a/modules/ROOT/pages/changelogs.adoc b/modules/ROOT/pages/changelogs.adoc index 5a83b6d0..6d2e38d9 100644 --- a/modules/ROOT/pages/changelogs.adoc +++ b/modules/ROOT/pages/changelogs.adoc @@ -1,6 +1,17 @@ :description: This page lists all changes to status codes per Neo4j version. = Changes to status codes per Neo4j version +== Neo4j 2024.12 +**New:** +[source, status codes, role="noheader"] +----- +Neo.ClientNotification.Cluster.ServerNotAvailable +Neo.ClientNotification.Cluster.ServerCatchingUp +Neo.ClientNotification.Cluster.ServerFailed +Neo.ClientNotification.Cluster.ServerCaughtUp +----- +Starting from 2024.12, when using Cypher25, queries using `WAIT` will return the notifications listed above instead of result rows. The behaviour for Cypher5 remains unchanged. + == Neo4j 5.25 Starting from 5.25, the query log includes the GQL error information under the JSON object `errorInfo`. diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 8d3d4187..f0bebc72 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -4823,3 +4823,309 @@ Description of the returned code:: A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated) ====== ===== + +// TODO label for Cypher25? +[role=label--new-2024.12] +[#_neo_clientnotification_cluster_servercaughtup] +=== WAIT Server caught up + +.Notification category details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Cluster.ServerCaughtUp +|Title +a|Server is caught up. +|Description +a|Server `(%s)` at address `(%s)` is caught up. +|Category +m|GENERIC +|GQLSTATUS code +m|03N85 +|Status description +a| +info: server is caught up. Server `${ name }` at address `${ address }` is caught up. +|Classification +m|GENERIC +|SeverityLevel +m|INFORMATION +|=== + + +.Successful completion of a `WAIT` command with two servers +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +---- + +One notification is returned for each server in the cluster: + +Returned GQLSTATUS code:: +03N85 + +Returned status description:: +info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. + +Returned GQLSTATUS code:: +03N85 + +Returned status description:: +info: server is caught up. Server `ServerId\{0e020000}` at address `localhost:20026` is caught up. +====== +[.include-with-neo4j--code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +---- +One notification is returned for each server in the cluster: + +Description of the returned code:: +Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. + +Description of the returned code:: +Server `ServerId\{0e020000}` at address `localhost:20026` is caught up. +====== +===== + +// TODO label for Cypher25? +[role=label--new-2024.12] +[#_neo_clientnotification_cluster_serverfailed] +=== WAIT Server failed + +.Notification category details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Cluster.ServerFailed +|Title +a|Server failed. +|Description +a|Server `(%s)` at address `(%s)` failed: (%s) +|Category +m|GENERIC +|GQLSTATUS code +m|01N80 +|Status description +a| +warn: server failed. Server `${ name }` at address `${ address }` failed: `${ message }` +|Classification +m|GENERIC +|SeverityLevel +m|WARNING +|=== + + +.One out of two servers failed during `WAIT` command +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +---- + +One notification is returned for each server in the cluster: + +Returned GQLSTATUS code:: +03N85 + +Returned status description:: +info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. + +Returned GQLSTATUS code:: +01N80 + +Returned status description:: +warn: server failed. Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...> + +Suggestions for improvement:: +Investigate the failing server using the provided message. +====== +[.include-with-neo4j--code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +---- +One notification is returned for each server in the cluster: + +Description of the returned code:: +Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. + +Description of the returned code:: +Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...> + +Suggestions for improvement:: +Investigate the failing server using the provided message. +====== +===== + +// TODO label for Cypher25? +[role=label--new-2024.12] +[#_neo_clientnotification_cluster_servercatchingup] +=== WAIT Server catching up + +.Notification category details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Cluster.ServerCachingUp +|Title +a|Server is still catching up. +|Description +a|Server `(%s)` at address `(%s)` is still catching up. +|Category +m|GENERIC +|GQLSTATUS code +m|01N81 +|Status description +a| +warn: server is catching up. Server `${ name }` at address `${ address }` is still catching up. +|Classification +m|GENERIC +|SeverityLevel +m|WARNING +|=== + + +.One out of two servers is still catching up during `WAIT` command +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +---- + +One notification is returned for each server in the cluster: + +Returned GQLSTATUS code:: +03N85 + +Returned status description:: +info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. + +Returned GQLSTATUS code:: +01N81 + +Returned status description:: +warn: server is catching up. Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. + +Suggestions for improvement:: +This behaviour indicates that one of the servers is lagging behind. Investigate the server and network for performance issues or increase the wait timeout. +====== +[.include-with-neo4j--code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +---- +One notification is returned for each server in the cluster: + +Description of the returned code:: +Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. + +Description of the returned code:: +Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. + +Suggestions for improvement:: +This behaviour indicates that one of the servers is lagging behind. Investigate the server and network for performance issues or increase the wait timeout. +====== +===== + +// TODO label for Cypher25? +[role=label--new-2024.12] +[#_neo_clientnotification_cluster_serverunavailable] +=== WAIT Server not available + +.Notification category details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Cluster.ServerNotAvailable +|Title +a|Server is not available. +|Description +a|Server `(%s)` at address `(%s)` is not available. +|Category +m|GENERIC +|GQLSTATUS code +m|01N82 +|Status description +a| +warn: server is not available. Server `${ name }` at address `${ address }` is not available. +|Classification +m|GENERIC +|SeverityLevel +m|WARNING +|=== + + +.One out of two servers is not available during `WAIT` command +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +---- + +One notification is returned for each server in the cluster: + +Returned GQLSTATUS code:: +03N85 + +Returned status description:: +info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. + +Returned GQLSTATUS code:: +01N82 + +Returned status description:: +warn: server is not available. Server `ServerId\{0e020000}` at address `localhost:20026` is not available. + +Suggestions for improvement:: +Investigate the server to determine why it is not available. +====== +[.include-with-neo4j--code] +====== +Query:: ++ +[source,cypher] +---- +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +---- +One notification is returned for each server in the cluster: + +Description of the returned code:: +Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. + +Description of the returned code:: +Server `ServerId\{0e020000}` at address `localhost:20026` is not available. + +Suggestions for improvement:: +Investigate the server to determine why it is not available. +====== +===== From c27b5d7d497b68710da574c3a4b7208d922b5bc5 Mon Sep 17 00:00:00 2001 From: Lasse Heemann Date: Thu, 5 Dec 2024 13:17:42 +0100 Subject: [PATCH 02/13] 'is caught up' -> 'has caught up' --- .../notifications/all-notifications.adoc | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index f0bebc72..a04364da 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -4835,16 +4835,16 @@ A variable-length relationship variable is bound more than once, which leads to |Neo4j code m|Neo.ClientNotification.Cluster.ServerCaughtUp |Title -a|Server is caught up. +a|Server has caught up. |Description -a|Server `(%s)` at address `(%s)` is caught up. +a|Server `(%s)` at address `(%s)` has caught up. |Category m|GENERIC |GQLSTATUS code m|03N85 |Status description a| -info: server is caught up. Server `${ name }` at address `${ address }` is caught up. +info: server has caught up. Server `${ name }` at address `${ address }` has caught up. |Classification m|GENERIC |SeverityLevel @@ -4870,13 +4870,13 @@ Returned GQLSTATUS code:: 03N85 Returned status description:: -info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. +info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. Returned GQLSTATUS code:: 03N85 Returned status description:: -info: server is caught up. Server `ServerId\{0e020000}` at address `localhost:20026` is caught up. +info: server has caught up. Server `ServerId\{0e020000}` at address `localhost:20026` has caught up. ====== [.include-with-neo4j--code] ====== @@ -4889,10 +4889,10 @@ CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT One notification is returned for each server in the cluster: Description of the returned code:: -Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. +Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. Description of the returned code:: -Server `ServerId\{0e020000}` at address `localhost:20026` is caught up. +Server `ServerId\{0e020000}` at address `localhost:20026` has caught up. ====== ===== @@ -4942,7 +4942,7 @@ Returned GQLSTATUS code:: 03N85 Returned status description:: -info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. +info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. Returned GQLSTATUS code:: 01N80 @@ -4964,7 +4964,7 @@ CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT One notification is returned for each server in the cluster: Description of the returned code:: -Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. +Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. Description of the returned code:: Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...> @@ -5020,7 +5020,7 @@ Returned GQLSTATUS code:: 03N85 Returned status description:: -info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. +info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. Returned GQLSTATUS code:: 01N81 @@ -5042,7 +5042,7 @@ CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT One notification is returned for each server in the cluster: Description of the returned code:: -Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. +Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. Description of the returned code:: Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. @@ -5098,7 +5098,7 @@ Returned GQLSTATUS code:: 03N85 Returned status description:: -info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. +info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. Returned GQLSTATUS code:: 01N82 @@ -5120,7 +5120,7 @@ CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT One notification is returned for each server in the cluster: Description of the returned code:: -Server `ServerId\{0e010000}` at address `localhost:20025` is caught up. +Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. Description of the returned code:: Server `ServerId\{0e020000}` at address `localhost:20026` is not available. From 11fac74e03bec69babd71b605114950bd66767dc Mon Sep 17 00:00:00 2001 From: Lasse Heemann Date: Fri, 6 Dec 2024 09:10:48 +0100 Subject: [PATCH 03/13] Update version tags --- modules/ROOT/pages/changelogs.adoc | 5 +++-- .../ROOT/pages/notifications/all-notifications.adoc | 12 ++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/modules/ROOT/pages/changelogs.adoc b/modules/ROOT/pages/changelogs.adoc index 6d2e38d9..cab7965a 100644 --- a/modules/ROOT/pages/changelogs.adoc +++ b/modules/ROOT/pages/changelogs.adoc @@ -1,7 +1,7 @@ :description: This page lists all changes to status codes per Neo4j version. = Changes to status codes per Neo4j version -== Neo4j 2024.12 +== Neo4j 2025.1 **New:** [source, status codes, role="noheader"] ----- @@ -10,7 +10,8 @@ Neo.ClientNotification.Cluster.ServerCatchingUp Neo.ClientNotification.Cluster.ServerFailed Neo.ClientNotification.Cluster.ServerCaughtUp ----- -Starting from 2024.12, when using Cypher25, queries using `WAIT` will return the notifications listed above instead of result rows. The behaviour for Cypher5 remains unchanged. +Starting from 2025.1, when using Cypher25, queries using `WAIT` will return the notifications listed above instead of result rows. +The behaviour for Cypher5 remains unchanged. == Neo4j 5.25 diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index a04364da..294ef8f4 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -4824,8 +4824,7 @@ A variable-length relationship variable is bound more than once, which leads to ====== ===== -// TODO label for Cypher25? -[role=label--new-2024.12] +[role=label--new-2025.01 label--Cypher25] [#_neo_clientnotification_cluster_servercaughtup] === WAIT Server caught up @@ -4896,8 +4895,7 @@ Server `ServerId\{0e020000}` at address `localhost:20026` has caught up. ====== ===== -// TODO label for Cypher25? -[role=label--new-2024.12] +[role=label--new-2025.01 label--Cypher25] [#_neo_clientnotification_cluster_serverfailed] === WAIT Server failed @@ -4974,8 +4972,7 @@ Investigate the failing server using the provided message. ====== ===== -// TODO label for Cypher25? -[role=label--new-2024.12] +[role=label--new-2025.01 label--Cypher25] [#_neo_clientnotification_cluster_servercatchingup] === WAIT Server catching up @@ -5052,8 +5049,7 @@ This behaviour indicates that one of the servers is lagging behind. Investigate ====== ===== -// TODO label for Cypher25? -[role=label--new-2024.12] +[role=label--new-2025.01 label--Cypher25] [#_neo_clientnotification_cluster_serverunavailable] === WAIT Server not available From 407c552190e84e73aff99586a0dfc3d96218e6e1 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 9 Dec 2024 16:41:07 +0000 Subject: [PATCH 04/13] Update modules/ROOT/pages/notifications/all-notifications.adoc --- modules/ROOT/pages/notifications/all-notifications.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 294ef8f4..31e8579b 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -5026,7 +5026,8 @@ Returned status description:: warn: server is catching up. Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. Suggestions for improvement:: -This behaviour indicates that one of the servers is lagging behind. Investigate the server and network for performance issues or increase the wait timeout. +This behaviour indicates that one of the servers is lagging behind. +Investigate the server and network for performance issues or increase the wait timeout. ====== [.include-with-neo4j--code] ====== From ce56819c7e8359570edcd6820253dd2fa75a25ec Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 9 Dec 2024 16:41:14 +0000 Subject: [PATCH 05/13] Update modules/ROOT/pages/notifications/all-notifications.adoc --- modules/ROOT/pages/notifications/all-notifications.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 31e8579b..8f13bde3 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -5046,7 +5046,8 @@ Description of the returned code:: Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. Suggestions for improvement:: -This behaviour indicates that one of the servers is lagging behind. Investigate the server and network for performance issues or increase the wait timeout. +This behaviour indicates that one of the servers is lagging behind. +Investigate the server and network for performance issues or increase the wait timeout. ====== ===== From 9cad247d987d8e38fb6677c0e9e1f70fb94a7fbf Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 9 Dec 2024 16:41:24 +0000 Subject: [PATCH 06/13] Update modules/ROOT/pages/notifications/all-notifications.adoc --- modules/ROOT/pages/notifications/all-notifications.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 8f13bde3..5e304918 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -5053,7 +5053,7 @@ Investigate the server and network for performance issues or increase the wait t [role=label--new-2025.01 label--Cypher25] [#_neo_clientnotification_cluster_serverunavailable] -=== WAIT Server not available +=== Server is not available during `WAIT` command .Notification category details [cols="<1s,<4"] From b9c76ce77a802ba0824059a4cc6179a0a0969c08 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 9 Dec 2024 16:41:32 +0000 Subject: [PATCH 07/13] Update modules/ROOT/pages/notifications/all-notifications.adoc --- modules/ROOT/pages/notifications/all-notifications.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 5e304918..c2c5c262 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -4974,7 +4974,7 @@ Investigate the failing server using the provided message. [role=label--new-2025.01 label--Cypher25] [#_neo_clientnotification_cluster_servercatchingup] -=== WAIT Server catching up +=== Server is still catching up during `WAIT` command .Notification category details [cols="<1s,<4"] From 7092d7e65b11c7a162d22991e4722de0a6875f32 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 9 Dec 2024 16:41:40 +0000 Subject: [PATCH 08/13] Update modules/ROOT/pages/notifications/all-notifications.adoc --- modules/ROOT/pages/notifications/all-notifications.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index c2c5c262..25d1d612 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -4897,7 +4897,7 @@ Server `ServerId\{0e020000}` at address `localhost:20026` has caught up. [role=label--new-2025.01 label--Cypher25] [#_neo_clientnotification_cluster_serverfailed] -=== WAIT Server failed +=== Server failed during `WAIT` command .Notification category details [cols="<1s,<4"] From 0cc36a2bd6f7fd4f5c08bf2b81754aecafadf342 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 9 Dec 2024 16:41:47 +0000 Subject: [PATCH 09/13] Update modules/ROOT/pages/notifications/all-notifications.adoc --- modules/ROOT/pages/notifications/all-notifications.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 25d1d612..f1e571ea 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -4826,7 +4826,7 @@ A variable-length relationship variable is bound more than once, which leads to [role=label--new-2025.01 label--Cypher25] [#_neo_clientnotification_cluster_servercaughtup] -=== WAIT Server caught up +=== Server has caught up during `WAIT` command .Notification category details [cols="<1s,<4"] From e90d03262327386be507a84ebee70da78f7c9d33 Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 9 Dec 2024 16:41:56 +0000 Subject: [PATCH 10/13] Update modules/ROOT/pages/changelogs.adoc --- modules/ROOT/pages/changelogs.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/changelogs.adoc b/modules/ROOT/pages/changelogs.adoc index cab7965a..09d57842 100644 --- a/modules/ROOT/pages/changelogs.adoc +++ b/modules/ROOT/pages/changelogs.adoc @@ -10,7 +10,7 @@ Neo.ClientNotification.Cluster.ServerCatchingUp Neo.ClientNotification.Cluster.ServerFailed Neo.ClientNotification.Cluster.ServerCaughtUp ----- -Starting from 2025.1, when using Cypher25, queries using `WAIT` will return the notifications listed above instead of result rows. +Starting from 2025.01, when using Cypher25, queries using `WAIT` return the notifications listed above instead of result rows. The behaviour for Cypher5 remains unchanged. == Neo4j 5.25 From 600ffd1b28954d8f206e0c38a85e22775971540f Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 9 Dec 2024 16:42:02 +0000 Subject: [PATCH 11/13] Update modules/ROOT/pages/changelogs.adoc --- modules/ROOT/pages/changelogs.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/changelogs.adoc b/modules/ROOT/pages/changelogs.adoc index 09d57842..548293fc 100644 --- a/modules/ROOT/pages/changelogs.adoc +++ b/modules/ROOT/pages/changelogs.adoc @@ -1,7 +1,7 @@ :description: This page lists all changes to status codes per Neo4j version. = Changes to status codes per Neo4j version -== Neo4j 2025.1 +== Neo4j 2025.01 **New:** [source, status codes, role="noheader"] ----- From 3262996b0fc5c85440af32e516dff53b9f98c182 Mon Sep 17 00:00:00 2001 From: Lasse Heemann Date: Wed, 11 Dec 2024 09:16:29 +0100 Subject: [PATCH 12/13] Notification category GENERIC -> TOPOLOGY --- .../notifications/all-notifications.adoc | 1206 ++++++++--------- 1 file changed, 603 insertions(+), 603 deletions(-) diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index f1e571ea..1d07adf1 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -3939,651 +3939,697 @@ The requested topology matched the current topology. No allocations were changed ====== ===== -[#_schema_notifications] -== `SCHEMA` category - -Schema notifications provide additional information related to indexes and constraints. - -[#_neo_clientnotification_schema_indexorconstraintalreadyexists] -=== Index or constraint already exists +[role=label--new-2025.01 label--Cypher25] +[#_neo_clientnotification_cluster_servercaughtup] +=== Server has caught up during `WAIT` command -.Notification details +.Notification category details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Schema.IndexOrConstraintAlreadyExists +m|Neo.ClientNotification.Cluster.ServerCaughtUp |Title -a|`` has no effect. -|Description -a|`` already exists. +a|Server has caught up. |Description -a|`%s` already exists. +a|Server `(%s)` at address `(%s)` has caught up. |Category -m|SCHEMA +m|TOPOLOGY |GQLSTATUS code -m|00NA0 +m|03N85 |Status description -a|note: successful completion - index or constraint already exists. -`{ $cmd }` has no effect. -`{ $index_constr_pat }` already exists. +a| +info: server has caught up. Server `${ name }` at address `${ address }` has caught up. +|Classification +m|TOPOLOGY |SeverityLevel m|INFORMATION |=== -*_```` and `cmd` could be either the full command given by the user or a subset of the given command._ - -.Creating an index when an equivalent index already exists +.Successful completion of a `WAIT` command with two servers [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== -Given a range index on `(:Label \{property})` named `existingRangeIndex`. - -Command:: +Query:: + -[source, cypher] +[source,cypher] ---- -CREATE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (n:Label) ON (n.property) +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT ---- +One notification is returned for each server in the cluster: + Returned GQLSTATUS code:: -00NA0 +03N85 Returned status description:: -note: successful completion - index or constraint already exists. -`CREATE RANGE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (e:Label) ON (e.property)` has no effect. -`RANGE INDEX existingRangeIndex FOR (e:Label) ON (e.property)` already exists. +info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. + +Returned GQLSTATUS code:: +03N85 +Returned status description:: +info: server has caught up. Server `ServerId\{0e020000}` at address `localhost:20026` has caught up. ====== [.include-with-neo4j--code] ====== -Given a range index on `(:Label \{property})` named `existingRangeIndex`. - -Command:: +Query:: + -[source, cypher] +[source,cypher] ---- -CREATE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (n:Label) ON (n.property) +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT ---- +One notification is returned for each server in the cluster: -Title of the returned code:: -`CREATE RANGE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (e:Label) ON (e.property)` has no effect. - -Full description of the returned code:: -`RANGE INDEX existingRangeIndex FOR (e:Label) ON (e.property)` already exists. +Description of the returned code:: +Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. +Description of the returned code:: +Server `ServerId\{0e020000}` at address `localhost:20026` has caught up. ====== ===== -.Creating an index when another unrelated index using that name already exists +[role=label--new-2025.01 label--Cypher25] +[#_neo_clientnotification_cluster_serverfailed] +=== Server failed during `WAIT` command + +.Notification category details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Cluster.ServerFailed +|Title +a|Server failed. +|Description +a|Server `(%s)` at address `(%s)` failed: (%s) +|Category +m|TOPOLOGY +|GQLSTATUS code +m|01N80 +|Status description +a| +warn: server failed. Server `${ name }` at address `${ address }` failed: `${ message }` +|Classification +m|TOPOLOGY +|SeverityLevel +m|WARNING +|=== + + +.One out of two servers failed during `WAIT` command [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== -Given a range index on `(:Label \{property})` named `myIndex`. - -Command:: +Query:: + -[source, cypher] +[source,cypher] ---- -CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT ---- +One notification is returned for each server in the cluster: + Returned GQLSTATUS code:: -00NA0 +03N85 Returned status description:: -note: successful completion - index or constraint already exists. -`CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[e:REL_TYPE]-() ON (e.property)` has no effect. -`RANGE INDEX myIndex FOR (e:Label) ON (e.property)` already exists. +info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. -Suggestions for improvement:: -Choose a different name for the new index and try again. -+ -[source, cypher] ----- -CREATE TEXT INDEX myIndex2 IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) ----- +Returned GQLSTATUS code:: +01N80 + +Returned status description:: +warn: server failed. Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...> +Suggestions for improvement:: +Investigate the failing server using the provided message. ====== [.include-with-neo4j--code] ====== -Given a range index on `(:Label \{property})` named `myIndex`. - -Command:: +Query:: + -[source, cypher] +[source,cypher] ---- -CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT ---- +One notification is returned for each server in the cluster: -Title of the returned code:: -`CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[e:REL_TYPE]-() ON (e.property)` has no effect. +Description of the returned code:: +Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. -Full description of the returned code:: -`RANGE INDEX myIndex FOR (e:Label) ON (e.property)` already exists. +Description of the returned code:: +Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...> Suggestions for improvement:: -Choose a different name for the new index and try again. -+ -[source, cypher] ----- -CREATE TEXT INDEX myIndex2 IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) ----- - +Investigate the failing server using the provided message. ====== ===== -.Creating a constraint when an identical constraint already exists +[role=label--new-2025.01 label--Cypher25] +[#_neo_clientnotification_cluster_servercatchingup] +=== Server is still catching up during `WAIT` command + +.Notification category details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Cluster.ServerCachingUp +|Title +a|Server is still catching up. +|Description +a|Server `(%s)` at address `(%s)` is still catching up. +|Category +m|TOPOLOGY +|GQLSTATUS code +m|01N81 +|Status description +a| +warn: server is catching up. Server `${ name }` at address `${ address }` is still catching up. +|Classification +m|TOPOLOGY +|SeverityLevel +m|WARNING +|=== + + +.One out of two servers is still catching up during `WAIT` command [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== -Given a node key constraint on `(:Label \{property})` named `nodeKeyLabelPropertyConstraint`. - -Command:: +Query:: + -[source, cypher] +[source,cypher] ---- -CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (n:Label) REQUIRE (n.property) IS NODE KEY +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT ---- +One notification is returned for each server in the cluster: + Returned GQLSTATUS code:: -00NA0 +03N85 Returned status description:: -note: successful completion - index or constraint already exists. -`CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (e:Label) REQUIRE (e.property) IS NODE KEY` has no effect. -`CONSTRAINT nodeKeyLabelPropertyConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. +info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. + +Returned GQLSTATUS code:: +01N81 +Returned status description:: +warn: server is catching up. Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. + +Suggestions for improvement:: +This behaviour indicates that one of the servers is lagging behind. +Investigate the server and network for performance issues or increase the wait timeout. ====== [.include-with-neo4j--code] ====== -Given a node key constraint on `(:Label \{property})` named `nodeKeyLabelPropertyConstraint`. - -Command:: +Query:: + -[source, cypher] +[source,cypher] ---- -CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (n:Label) REQUIRE (n.property) IS NODE KEY +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT ---- +One notification is returned for each server in the cluster: -Title of the returned code:: -`CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (e:Label) REQUIRE (e.property) IS NODE KEY` has no effect. +Description of the returned code:: +Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. -Full description of the returned code:: -`CONSTRAINT nodeKeyLabelPropertyConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. +Description of the returned code:: +Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. +Suggestions for improvement:: +This behaviour indicates that one of the servers is lagging behind. +Investigate the server and network for performance issues or increase the wait timeout. ====== ===== +[role=label--new-2025.01 label--Cypher25] +[#_neo_clientnotification_cluster_serverunavailable] +=== Server is not available during `WAIT` command -.Creating a constraint when another unrelated constraint using that name already exists +.Notification category details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Cluster.ServerNotAvailable +|Title +a|Server is not available. +|Description +a|Server `(%s)` at address `(%s)` is not available. +|Category +m|TOPOLOGY +|GQLSTATUS code +m|01N82 +|Status description +a| +warn: server is not available. Server `${ name }` at address `${ address }` is not available. +|Classification +m|TOPOLOGY +|SeverityLevel +m|WARNING +|=== + + +.One out of two servers is not available during `WAIT` command [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== -Given a node key constraint on `(:Label \{property})` named `myConstraint`. - -Command:: +Query:: + -[source, cypher] +[source,cypher] ---- -CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT ---- +One notification is returned for each server in the cluster: + Returned GQLSTATUS code:: -00NA0 +03N85 Returned status description:: -note: successful completion - index or constraint already exists. -`CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (e:Label2) REQUIRE (e.property2) IS NOT NULL` has no effect. -`CONSTRAINT myConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. +info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. -Suggestions for improvement:: -Choose a different name for the new constraint and try again. -+ -[source, cypher] ----- -CREATE CONSTRAINT myConstraint2 IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL ----- +Returned GQLSTATUS code:: +01N82 + +Returned status description:: +warn: server is not available. Server `ServerId\{0e020000}` at address `localhost:20026` is not available. +Suggestions for improvement:: +Investigate the server to determine why it is not available. ====== [.include-with-neo4j--code] ====== -Given a node key constraint on `(:Label \{property})` named `myConstraint`. - -Command:: +Query:: + -[source, cypher] +[source,cypher] ---- -CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL +CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT ---- +One notification is returned for each server in the cluster: -Title of the returned code:: -`CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (e:Label2) REQUIRE (e.property2) IS NOT NULL` has no effect. +Description of the returned code:: +Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. -Full description of the returned code:: -`CONSTRAINT myConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. +Description of the returned code:: +Server `ServerId\{0e020000}` at address `localhost:20026` is not available. Suggestions for improvement:: -Choose a different name for the new constraint and try again. -+ -[source, cypher] ----- -CREATE CONSTRAINT myConstraint2 IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL ----- - +Investigate the server to determine why it is not available. ====== ===== -[#_neo_clientnotification_schema_indexorconstraintdoesnotexist] -=== Index or constraint does not exist + +[#_schema_notifications] +== `SCHEMA` category + +Schema notifications provide additional information related to indexes and constraints. + +[#_neo_clientnotification_schema_indexorconstraintalreadyexists] +=== Index or constraint already exists .Notification details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Schema.IndexOrConstraintDoesNotExist +m|Neo.ClientNotification.Schema.IndexOrConstraintAlreadyExists |Title a|`` has no effect. |Description -a|`%s` does not exist. +a|`` already exists. +|Description +a|`%s` already exists. |Category m|SCHEMA |GQLSTATUS code -m|00NA1 +m|00NA0 |Status description -a|note: successful completion - index or constraint does not exist. +a|note: successful completion - index or constraint already exists. `{ $cmd }` has no effect. -`{ $index_constr_name }` does not exist. +`{ $index_constr_pat }` already exists. |SeverityLevel m|INFORMATION |=== -.Attempting to drop a non-existing index +*_```` and `cmd` could be either the full command given by the user or a subset of the given command._ + +.Creating an index when an equivalent index already exists [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== +Given a range index on `(:Label \{property})` named `existingRangeIndex`. + Command:: + [source, cypher] ---- -DROP INDEX nonExistingIndex IF EXISTS +CREATE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (n:Label) ON (n.property) ---- Returned GQLSTATUS code:: -00NA1 +00NA0 Returned status description:: -note: successful completion - index or constraint does not exist. -`DROP INDEX nonExistingIndex IF EXISTS` has no effect. -`nonExistingIndex` does not exist. +note: successful completion - index or constraint already exists. +`CREATE RANGE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (e:Label) ON (e.property)` has no effect. +`RANGE INDEX existingRangeIndex FOR (e:Label) ON (e.property)` already exists. + +====== +[.include-with-neo4j--code] +====== +Given a range index on `(:Label \{property})` named `existingRangeIndex`. + +Command:: ++ +[source, cypher] +---- +CREATE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (n:Label) ON (n.property) +---- + +Title of the returned code:: +`CREATE RANGE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (e:Label) ON (e.property)` has no effect. + +Full description of the returned code:: +`RANGE INDEX existingRangeIndex FOR (e:Label) ON (e.property)` already exists. + +====== +===== + +.Creating an index when another unrelated index using that name already exists +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Given a range index on `(:Label \{property})` named `myIndex`. + +Command:: ++ +[source, cypher] +---- +CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) +---- + +Returned GQLSTATUS code:: +00NA0 + +Returned status description:: +note: successful completion - index or constraint already exists. +`CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[e:REL_TYPE]-() ON (e.property)` has no effect. +`RANGE INDEX myIndex FOR (e:Label) ON (e.property)` already exists. Suggestions for improvement:: -Verify that this is the intended index and that it is spelled correctly. +Choose a different name for the new index and try again. ++ +[source, cypher] +---- +CREATE TEXT INDEX myIndex2 IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) +---- ====== [.include-with-neo4j--code] ====== +Given a range index on `(:Label \{property})` named `myIndex`. Command:: + [source, cypher] ---- -DROP INDEX nonExistingIndex IF EXISTS +CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) ---- Title of the returned code:: -`DROP INDEX nonExistingIndex IF EXISTS` has no effect. +`CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[e:REL_TYPE]-() ON (e.property)` has no effect. Full description of the returned code:: -`nonExistingIndex` does not exist. +`RANGE INDEX myIndex FOR (e:Label) ON (e.property)` already exists. Suggestions for improvement:: -Verify that this is the intended index and that it is spelled correctly. +Choose a different name for the new index and try again. ++ +[source, cypher] +---- +CREATE TEXT INDEX myIndex2 IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property) +---- ====== ===== -.Attempting to drop a non-existing constraint +.Creating a constraint when an identical constraint already exists [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== +Given a node key constraint on `(:Label \{property})` named `nodeKeyLabelPropertyConstraint`. + Command:: + [source, cypher] ---- -DROP CONSTRAINT nonExistingConstraint IF EXISTS +CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (n:Label) REQUIRE (n.property) IS NODE KEY ---- Returned GQLSTATUS code:: -00NA1 +00NA0 Returned status description:: -note: successful completion - index or constraint does not exist. -`DROP CONSTRAINT nonExistingConstraint IF EXISTS` has no effect. -`nonExistingConstraint` does not exist. - -Suggestions for improvement:: -Verify that this is the intended constraint and that it is spelled correctly. +note: successful completion - index or constraint already exists. +`CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (e:Label) REQUIRE (e.property) IS NODE KEY` has no effect. +`CONSTRAINT nodeKeyLabelPropertyConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. ====== [.include-with-neo4j--code] ====== +Given a node key constraint on `(:Label \{property})` named `nodeKeyLabelPropertyConstraint`. Command:: + [source, cypher] ---- -DROP CONSTRAINT nonExistingConstraint IF EXISTS +CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (n:Label) REQUIRE (n.property) IS NODE KEY ---- Title of the returned code:: -`DROP CONSTRAINT nonExistingConstraint IF EXISTS` has no effect. +`CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (e:Label) REQUIRE (e.property) IS NODE KEY` has no effect. Full description of the returned code:: -`nonExistingConstraint` does not exist. - -Suggestions for improvement:: -Verify that this is the intended constraint and that it is spelled correctly. +`CONSTRAINT nodeKeyLabelPropertyConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. ====== ===== -[#_generic] -== `GENERIC` notifications - -`GENERIC` notification codes do not belong to any wider category and do not have any connection to each other. - -[#_neo_clientnotification_statement_subqueryvariableshadowing] -=== Subquery variable shadowing - -.Notification details -[cols="<1s,<4"] -|=== -|Neo4j code -m|Neo.ClientNotification.Statement.SubqueryVariableShadowing -|Title -a|Variable in subquery is shadowing a variable with the same name from the outer scope. -|Description -|Variable in subquery is shadowing a variable with the same name from the outer scope. -If you want to use that variable instead, it must be imported into the subquery using importing WITH clause. (`%s`) -|Category -m|GENERIC -|GQLSTATUS code -m|03N60 -|Status description -a|info: subquery variable shadowing. -The variable `{ $var }` in the subquery uses the same name as a variable from the outer query. -Use `WITH $var` in the subquery to import the one from the outer scope unless you want it to be a new variable. -|Classification -m|GENERIC -|SeverityLevel -m|INFORMATION -|=== -.Shadowing of a variable from the outer scope +.Creating a constraint when another unrelated constraint using that name already exists [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== -Query:: +Given a node key constraint on `(:Label \{property})` named `myConstraint`. + +Command:: + -[source,cypher] +[source, cypher] ---- -MATCH (n) -CALL { - MATCH (n)--(m) - RETURN m -} -RETURN * +CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL ---- Returned GQLSTATUS code:: -03N60 +00NA0 Returned status description:: -info: subquery variable shadowing. -The variable `n` in the subquery uses the same name as a variable from the outer query. -Use `WITH n` in the subquery to import the one from the outer scope unless you want it to be a new variable. +note: successful completion - index or constraint already exists. +`CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (e:Label2) REQUIRE (e.property2) IS NOT NULL` has no effect. +`CONSTRAINT myConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. Suggestions for improvement:: -If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. -If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the `WITH` clause. +Choose a different name for the new constraint and try again. + -[source,cypher] +[source, cypher] ---- -MATCH (n) -CALL { - WITH n - MATCH (n)--(m) - RETURN m -} -RETURN * +CREATE CONSTRAINT myConstraint2 IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL ---- + ====== [.include-with-neo4j--code] ====== -Query:: +Given a node key constraint on `(:Label \{property})` named `myConstraint`. + +Command:: + -[source,cypher] +[source, cypher] ---- -MATCH (n) -CALL { - MATCH (n)--(m) - RETURN m -} -RETURN * +CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL ---- -Description of the returned code:: -Variable in subquery is shadowing a variable with the same name from the outer scope. -If you want to use that variable instead, it must be imported into the subquery using importing `WITH` clause. (the shadowing variable is: `n`) +Title of the returned code:: +`CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (e:Label2) REQUIRE (e.property2) IS NOT NULL` has no effect. + +Full description of the returned code:: +`CONSTRAINT myConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY` already exists. Suggestions for improvement:: -If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. -If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the `WITH` clause. +Choose a different name for the new constraint and try again. + -[source,cypher] +[source, cypher] ---- -MATCH (n) -CALL { - WITH n - MATCH (n)--(m) - RETURN m -} -RETURN * +CREATE CONSTRAINT myConstraint2 IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL ---- + ====== ===== -[#_neo_clientnotification_statement_redundantoptionalprocedure] -=== Redundant optional procedure +[#_neo_clientnotification_schema_indexorconstraintdoesnotexist] +=== Index or constraint does not exist .Notification details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Statement.RedundantOptionalProcedure +m|Neo.ClientNotification.Schema.IndexOrConstraintDoesNotExist |Title -a|The use of `OPTIONAL` is redundant when the procedure calls a void procedure. +a|`` has no effect. |Description -|The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure. +a|`%s` does not exist. |Category -m|GENERIC +m|SCHEMA |GQLSTATUS code -m|03N61 +m|00NA1 |Status description -a|info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure. -|Classification -m|GENERIC +a|note: successful completion - index or constraint does not exist. +`{ $cmd }` has no effect. +`{ $index_constr_name }` does not exist. |SeverityLevel m|INFORMATION |=== -.Redundant use of `OPTIONAL` in a procedure call +.Attempting to drop a non-existing index [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== -Query:: +Command:: + -[source,cypher] +[source, cypher] ---- -OPTIONAL CALL db.createLabel("A") +DROP INDEX nonExistingIndex IF EXISTS ---- + Returned GQLSTATUS code:: -03N61 +00NA1 Returned status description:: -info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. +note: successful completion - index or constraint does not exist. +`DROP INDEX nonExistingIndex IF EXISTS` has no effect. +`nonExistingIndex` does not exist. Suggestions for improvement:: -If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query. -+ -[source,cypher] ----- -CALL db.createLabel("A") ----- +Verify that this is the intended index and that it is spelled correctly. + ====== [.include-with-neo4j--code] ====== -Query:: + +Command:: + -[source,cypher] +[source, cypher] ---- -OPTIONAL CALL db.createLabel("A") +DROP INDEX nonExistingIndex IF EXISTS ---- -Description of the returned code:: -The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. +Title of the returned code:: +`DROP INDEX nonExistingIndex IF EXISTS` has no effect. + +Full description of the returned code:: +`nonExistingIndex` does not exist. Suggestions for improvement:: -If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query. -+ -[source,cypher] ----- -CALL db.createLabel("A") ----- +Verify that this is the intended index and that it is spelled correctly. + ====== ===== -[#_neo_clientnotification_statement_redundantoptionalsubquery] -=== Redundant optional subquery - -.Notification details -[cols="<1s,<4"] -|=== -|Neo4j code -m|Neo.ClientNotification.Statement.RedundantOptionalSubquery -|Title -a|The use of `OPTIONAL` is redundant when `CALL` is a unit subquery. -|Description -|The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. -|Category -m|GENERIC -|GQLSTATUS code -m|03N62 -|Status description -a|info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. -|Classification -m|GENERIC -|SeverityLevel -m|INFORMATION -|=== - -.Redundant use of `OPTIONAL` in a `CALL` subquery +.Attempting to drop a non-existing constraint [.tabbed-example] ===== [.include-with-GQLSTATUS-code] ====== -Query:: +Command:: + -[source,cypher] +[source, cypher] ---- -UNWIND [1, 2, 3] AS x -OPTIONAL CALL (x) { - CREATE({i:x}) -} +DROP CONSTRAINT nonExistingConstraint IF EXISTS ---- Returned GQLSTATUS code:: -03N62 +00NA1 -Description of the returned code:: -info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. +Returned status description:: +note: successful completion - index or constraint does not exist. +`DROP CONSTRAINT nonExistingConstraint IF EXISTS` has no effect. +`nonExistingConstraint` does not exist. Suggestions for improvement:: -If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query. -+ -[source,cypher] ----- -UNWIND [1, 2, 3] AS x -CALL (x) { - CREATE({i:x}) -} ----- +Verify that this is the intended constraint and that it is spelled correctly. + ====== [.include-with-neo4j--code] ====== -Query:: + +Command:: + -[source,cypher] +[source, cypher] ---- -UNWIND [1, 2, 3] AS x -OPTIONAL CALL (x) { - CREATE({i:x}) -} +DROP CONSTRAINT nonExistingConstraint IF EXISTS ---- -Description of the returned code:: -Optional is redundant in the case of a unit subquery. The use of `OPTIONAL` on unit subqueries have no effect and can be removed. +Title of the returned code:: +`DROP CONSTRAINT nonExistingConstraint IF EXISTS` has no effect. + +Full description of the returned code:: +`nonExistingConstraint` does not exist. Suggestions for improvement:: -If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query. -+ -[source,cypher] ----- -UNWIND [1, 2, 3] AS x -CALL (x) { - CREATE({i:x}) -} ----- +Verify that this is the intended constraint and that it is spelled correctly. + ====== ===== -[#_neo_clientnotification_statement_parameternotprovided] -=== Parameter missing +[#_generic] +== `GENERIC` notifications + +`GENERIC` notification codes do not belong to any wider category and do not have any connection to each other. + +[#_neo_clientnotification_statement_subqueryvariableshadowing] +=== Subquery variable shadowing .Notification details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Statement.ParameterNotProvided +m|Neo.ClientNotification.Statement.SubqueryVariableShadowing |Title -a|The statement refers to a parameter that was not provided in the request. +a|Variable in subquery is shadowing a variable with the same name from the outer scope. |Description -|Did not supply query with enough parameters. -The produced query plan will not be cached and is not executable without EXPLAIN. (`%s`) +|Variable in subquery is shadowing a variable with the same name from the outer scope. +If you want to use that variable instead, it must be imported into the subquery using importing WITH clause. (`%s`) |Category m|GENERIC |GQLSTATUS code -m|01N60 +m|03N60 |Status description -a|warn: parameter missing. -The query plan cannot be cached and is not executable without `EXPLAIN` due to the undefined parameter(s) `{ $param_list }`. -Provide the parameter(s). +a|info: subquery variable shadowing. +The variable `{ $var }` in the subquery uses the same name as a variable from the outer query. +Use `WITH $var` in the subquery to import the one from the outer scope unless you want it to be a new variable. |Classification m|GENERIC |SeverityLevel -m|WARNING +m|INFORMATION |=== - -.Using an `EXPLAIN` query with parameters without providing them +.Shadowing of a variable from the outer scope [.tabbed-example] ===== [.include-with-GQLSTATUS-code] @@ -4592,20 +4638,36 @@ Query:: + [source,cypher] ---- -EXPLAIN WITH $param as param -RETURN param +MATCH (n) +CALL { + MATCH (n)--(m) + RETURN m +} +RETURN * ---- Returned GQLSTATUS code:: -01N60 +03N60 Returned status description:: -warn: parameter missing. -The query plan cannot be cached and is not executable without `EXPLAIN` due to the undefined parameter(s) `{ $param }`. -Provide the parameter(s). +info: subquery variable shadowing. +The variable `n` in the subquery uses the same name as a variable from the outer query. +Use `WITH n` in the subquery to import the one from the outer scope unless you want it to be a new variable. Suggestions for improvement:: -Provide the parameter to be able to cache the plan. +If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. +If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the `WITH` clause. ++ +[source,cypher] +---- +MATCH (n) +CALL { + WITH n + MATCH (n)--(m) + RETURN m +} +RETURN * +---- ====== [.include-with-neo4j--code] ====== @@ -4613,77 +4675,60 @@ Query:: + [source,cypher] ---- -EXPLAIN WITH $param as param -RETURN param +MATCH (n) +CALL { + MATCH (n)--(m) + RETURN m +} +RETURN * ---- Description of the returned code:: -Did not supply query with enough parameters. -The produced query plan will not be cached and is not executable without `EXPLAIN`. (Missing parameters: `param`) +Variable in subquery is shadowing a variable with the same name from the outer scope. +If you want to use that variable instead, it must be imported into the subquery using importing `WITH` clause. (the shadowing variable is: `n`) Suggestions for improvement:: -Provide the parameter to be able to cache the plan. - +If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. +If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the `WITH` clause. ++ +[source,cypher] +---- +MATCH (n) +CALL { + WITH n + MATCH (n)--(m) + RETURN m +} +RETURN * +---- ====== ===== - -[#_neo_clientnotification_procedure_procedurewarning] -=== Procedure or function execution warning +[#_neo_clientnotification_statement_redundantoptionalprocedure] +=== Redundant optional procedure .Notification details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Procedure.ProcedureWarning -|Title -a|The query used a procedure that generated a warning. -|Description -|The query used a procedure that generated a warning. (`%s`) -|Category -m|GENERIC -|GQLSTATUS code -m|01N62 -|Status description -a|warn: procedure execution warning. -The procedure `{ $proc }` generates the warning `{ $msg }`. -|Classification -m|GENERIC -|SeverityLevel -m|WARNING -|=== - - -[role=label--new-5.4] -[#_neo_clientnotification_statement_unsatisfiablerelationshiptypeexpression] -=== Unsatisfiable relationship type expression - -When matching on a relationship type expression that can never be satisfied, for example asking for zero, more than one or contradictory types. - -.Notification category details -[cols="<1s,<4"] -|=== -|Neo4j code -m|Neo.ClientNotification.Statement.UnsatisfiableRelationshipTypeExpression +m|Neo.ClientNotification.Statement.RedundantOptionalProcedure |Title -a|The query contains a relationship type expression that cannot be satisfied. +a|The use of `OPTIONAL` is redundant when the procedure calls a void procedure. |Description -|Relationship type expression cannot possibly be satisfied. (`%s`) +|The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure. |Category m|GENERIC |GQLSTATUS code -m|01N61 +m|03N61 |Status description -a|warn: unsatisfiable relationship type expression. -The expression `{ $label_expr }` cannot be satisfied because relationships must have exactly one type. +a|info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL %s` is a void procedure. |Classification m|GENERIC |SeverityLevel -m|WARNING +m|INFORMATION |=== - -.Matching on a relationship type expression that can never be satisfied +.Redundant use of `OPTIONAL` in a procedure call [.tabbed-example] ===== [.include-with-GQLSTATUS-code] @@ -4692,15 +4737,21 @@ Query:: + [source,cypher] ---- -MATCH ()-[r:R1&R2]->() RETURN r +OPTIONAL CALL db.createLabel("A") ---- - Returned GQLSTATUS code:: -01N61 +03N61 Returned status description:: -warn: unsatisfiable relationship type expression. -The expression `R1&R2` cannot be satisfied because relationships must have exactly one type. +info: redundant optional procedure. The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. + +Suggestions for improvement:: +If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query. ++ +[source,cypher] +---- +CALL db.createLabel("A") +---- ====== [.include-with-neo4j--code] ====== @@ -4708,43 +4759,47 @@ Query:: + [source,cypher] ---- -MATCH ()-[r:R1&R2]->() RETURN r +OPTIONAL CALL db.createLabel("A") ---- + Description of the returned code:: -Relationship type expression cannot possibly be satisfied. (`R1&R2` can never be fulfilled by any relationship. Relationships must have exactly one type.) +The use of `OPTIONAL` is redundant as `CALL db.createLabel` is a void procedure. + +Suggestions for improvement:: +If the intended behavior of the query is to use a void procedure, the `OPTIONAL` keyword can be removed without impacting the query. ++ +[source,cypher] +---- +CALL db.createLabel("A") +---- ====== ===== -[role=label--new-5.5] -[#_neo_clientnotification_statement_repeatedrelationshipreference] -=== Repeated relationship reference +[#_neo_clientnotification_statement_redundantoptionalsubquery] +=== Redundant optional subquery -.Notification category details +.Notification details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Statement.RepeatedRelationshipReference +m|Neo.ClientNotification.Statement.RedundantOptionalSubquery |Title -a|The query returns no results because a relationship variable is bound more than once. +a|The use of `OPTIONAL` is redundant when `CALL` is a unit subquery. |Description -a| -- A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (`%s`) -- A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (`%s`) +|The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. |Category m|GENERIC |GQLSTATUS code -m|01N63 +m|03N62 |Status description -a| -warn: repeated relationship reference. `{ $var }` is repeated in `{ $pat }`, which leads to no results. +a|info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. |Classification m|GENERIC |SeverityLevel -m|WARNING +m|INFORMATION |=== - -.Binding a relationship variable more than once +.Redundant use of `OPTIONAL` in a `CALL` subquery [.tabbed-example] ===== [.include-with-GQLSTATUS-code] @@ -4753,22 +4808,27 @@ Query:: + [source,cypher] ---- -MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r +UNWIND [1, 2, 3] AS x +OPTIONAL CALL (x) { + CREATE({i:x}) +} ---- Returned GQLSTATUS code:: -01N63 +03N62 -Returned status description:: -warn: repeated relationship reference. -`r` is repeated in `(:A)-[r]->(), ()-[r]->(:B)`, which leads to no results. +Description of the returned code:: +info: redundant optional subquery. The use of `OPTIONAL` is redundant as `CALL` is a unit subquery. Suggestions for improvement:: -Use one pattern to match all relationships that start with a node with the label `A` and end with a node with the label `B`: +If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query. + -[source, cypher, role="noplay"] +[source,cypher] ---- -MATCH (:A)-[r]->(:B) RETURN r +UNWIND [1, 2, 3] AS x +CALL (x) { + CREATE({i:x}) +} ---- ====== [.include-with-neo4j--code] @@ -4777,81 +4837,57 @@ Query:: + [source,cypher] ---- -MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r +UNWIND [1, 2, 3] AS x +OPTIONAL CALL (x) { + CREATE({i:x}) +} ---- + Description of the returned code:: -A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (Relationship `r` was repeated) +Optional is redundant in the case of a unit subquery. The use of `OPTIONAL` on unit subqueries have no effect and can be removed. Suggestions for improvement:: -Use one pattern to match all relationships that start with a node with the label `A` and end with a node with the label `B`: -+ -[source, cypher, role="noplay"] ----- -MATCH (:A)-[r]->(:B) RETURN r ----- -====== -===== - -.Binding a variable-length relationship variable more than once (when run on version 5.6 or newer) -[.tabbed-example] -===== -[.include-with-GQLSTATUS-code] -====== -Query:: -+ -[source,cypher] ----- -MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count ----- - -Returned GQLSTATUS code:: -01N63 - -Returned status description:: -warn: repeated relationship reference. -`r` is repeated in `()-[r*]->()<-[r*]-()`, which leads to no results. -====== -[.include-with-neo4j--code] -====== -Query:: +If the intended behavior of the query is for the subquery not to return any values, the `OPTIONAL` keyword can be removed without impacting the query. + [source,cypher] ---- -MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count +UNWIND [1, 2, 3] AS x +CALL (x) { + CREATE({i:x}) +} ---- -Description of the returned code:: -A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated) ====== ===== -[role=label--new-2025.01 label--Cypher25] -[#_neo_clientnotification_cluster_servercaughtup] -=== Server has caught up during `WAIT` command +[#_neo_clientnotification_statement_parameternotprovided] +=== Parameter missing -.Notification category details +.Notification details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Cluster.ServerCaughtUp +m|Neo.ClientNotification.Statement.ParameterNotProvided |Title -a|Server has caught up. +a|The statement refers to a parameter that was not provided in the request. |Description -a|Server `(%s)` at address `(%s)` has caught up. +|Did not supply query with enough parameters. +The produced query plan will not be cached and is not executable without EXPLAIN. (`%s`) |Category m|GENERIC |GQLSTATUS code -m|03N85 +m|01N60 |Status description -a| -info: server has caught up. Server `${ name }` at address `${ address }` has caught up. +a|warn: parameter missing. +The query plan cannot be cached and is not executable without `EXPLAIN` due to the undefined parameter(s) `{ $param_list }`. +Provide the parameter(s). |Classification m|GENERIC |SeverityLevel -m|INFORMATION +m|WARNING |=== -.Successful completion of a `WAIT` command with two servers +.Using an `EXPLAIN` query with parameters without providing them [.tabbed-example] ===== [.include-with-GQLSTATUS-code] @@ -4860,22 +4896,20 @@ Query:: + [source,cypher] ---- -CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +EXPLAIN WITH $param as param +RETURN param ---- -One notification is returned for each server in the cluster: - Returned GQLSTATUS code:: -03N85 +01N60 Returned status description:: -info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. - -Returned GQLSTATUS code:: -03N85 +warn: parameter missing. +The query plan cannot be cached and is not executable without `EXPLAIN` due to the undefined parameter(s) `{ $param }`. +Provide the parameter(s). -Returned status description:: -info: server has caught up. Server `ServerId\{0e020000}` at address `localhost:20026` has caught up. +Suggestions for improvement:: +Provide the parameter to be able to cache the plan. ====== [.include-with-neo4j--code] ====== @@ -4883,38 +4917,69 @@ Query:: + [source,cypher] ---- -CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +EXPLAIN WITH $param as param +RETURN param ---- -One notification is returned for each server in the cluster: Description of the returned code:: -Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. +Did not supply query with enough parameters. +The produced query plan will not be cached and is not executable without `EXPLAIN`. (Missing parameters: `param`) + +Suggestions for improvement:: +Provide the parameter to be able to cache the plan. -Description of the returned code:: -Server `ServerId\{0e020000}` at address `localhost:20026` has caught up. ====== ===== -[role=label--new-2025.01 label--Cypher25] -[#_neo_clientnotification_cluster_serverfailed] -=== Server failed during `WAIT` command + +[#_neo_clientnotification_procedure_procedurewarning] +=== Procedure or function execution warning + +.Notification details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Procedure.ProcedureWarning +|Title +a|The query used a procedure that generated a warning. +|Description +|The query used a procedure that generated a warning. (`%s`) +|Category +m|GENERIC +|GQLSTATUS code +m|01N62 +|Status description +a|warn: procedure execution warning. +The procedure `{ $proc }` generates the warning `{ $msg }`. +|Classification +m|GENERIC +|SeverityLevel +m|WARNING +|=== + + +[role=label--new-5.4] +[#_neo_clientnotification_statement_unsatisfiablerelationshiptypeexpression] +=== Unsatisfiable relationship type expression + +When matching on a relationship type expression that can never be satisfied, for example asking for zero, more than one or contradictory types. .Notification category details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Cluster.ServerFailed +m|Neo.ClientNotification.Statement.UnsatisfiableRelationshipTypeExpression |Title -a|Server failed. +a|The query contains a relationship type expression that cannot be satisfied. |Description -a|Server `(%s)` at address `(%s)` failed: (%s) +|Relationship type expression cannot possibly be satisfied. (`%s`) |Category m|GENERIC |GQLSTATUS code -m|01N80 +m|01N61 |Status description -a| -warn: server failed. Server `${ name }` at address `${ address }` failed: `${ message }` +a|warn: unsatisfiable relationship type expression. +The expression `{ $label_expr }` cannot be satisfied because relationships must have exactly one type. |Classification m|GENERIC |SeverityLevel @@ -4922,7 +4987,7 @@ m|WARNING |=== -.One out of two servers failed during `WAIT` command +.Matching on a relationship type expression that can never be satisfied [.tabbed-example] ===== [.include-with-GQLSTATUS-code] @@ -4931,25 +4996,15 @@ Query:: + [source,cypher] ---- -CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +MATCH ()-[r:R1&R2]->() RETURN r ---- -One notification is returned for each server in the cluster: - Returned GQLSTATUS code:: -03N85 - -Returned status description:: -info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. - -Returned GQLSTATUS code:: -01N80 +01N61 Returned status description:: -warn: server failed. Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...> - -Suggestions for improvement:: -Investigate the failing server using the provided message. +warn: unsatisfiable relationship type expression. +The expression `R1&R2` cannot be satisfied because relationships must have exactly one type. ====== [.include-with-neo4j--code] ====== @@ -4957,41 +5012,35 @@ Query:: + [source,cypher] ---- -CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +MATCH ()-[r:R1&R2]->() RETURN r ---- -One notification is returned for each server in the cluster: - -Description of the returned code:: -Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. - Description of the returned code:: -Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...> - -Suggestions for improvement:: -Investigate the failing server using the provided message. +Relationship type expression cannot possibly be satisfied. (`R1&R2` can never be fulfilled by any relationship. Relationships must have exactly one type.) ====== ===== -[role=label--new-2025.01 label--Cypher25] -[#_neo_clientnotification_cluster_servercatchingup] -=== Server is still catching up during `WAIT` command +[role=label--new-5.5] +[#_neo_clientnotification_statement_repeatedrelationshipreference] +=== Repeated relationship reference .Notification category details [cols="<1s,<4"] |=== |Neo4j code -m|Neo.ClientNotification.Cluster.ServerCachingUp +m|Neo.ClientNotification.Statement.RepeatedRelationshipReference |Title -a|Server is still catching up. +a|The query returns no results because a relationship variable is bound more than once. |Description -a|Server `(%s)` at address `(%s)` is still catching up. +a| +- A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (`%s`) +- A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (`%s`) |Category m|GENERIC |GQLSTATUS code -m|01N81 +m|01N63 |Status description a| -warn: server is catching up. Server `${ name }` at address `${ address }` is still catching up. +warn: repeated relationship reference. `{ $var }` is repeated in `{ $pat }`, which leads to no results. |Classification m|GENERIC |SeverityLevel @@ -4999,7 +5048,7 @@ m|WARNING |=== -.One out of two servers is still catching up during `WAIT` command +.Binding a relationship variable more than once [.tabbed-example] ===== [.include-with-GQLSTATUS-code] @@ -5008,26 +5057,23 @@ Query:: + [source,cypher] ---- -CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r ---- -One notification is returned for each server in the cluster: - -Returned GQLSTATUS code:: -03N85 - -Returned status description:: -info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. - Returned GQLSTATUS code:: -01N81 +01N63 Returned status description:: -warn: server is catching up. Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. +warn: repeated relationship reference. +`r` is repeated in `(:A)-[r]->(), ()-[r]->(:B)`, which leads to no results. Suggestions for improvement:: -This behaviour indicates that one of the servers is lagging behind. -Investigate the server and network for performance issues or increase the wait timeout. +Use one pattern to match all relationships that start with a node with the label `A` and end with a node with the label `B`: ++ +[source, cypher, role="noplay"] +---- +MATCH (:A)-[r]->(:B) RETURN r +---- ====== [.include-with-neo4j--code] ====== @@ -5035,50 +5081,22 @@ Query:: + [source,cypher] ---- -CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r ---- -One notification is returned for each server in the cluster: - Description of the returned code:: -Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. - -Description of the returned code:: -Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up. +A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (Relationship `r` was repeated) Suggestions for improvement:: -This behaviour indicates that one of the servers is lagging behind. -Investigate the server and network for performance issues or increase the wait timeout. +Use one pattern to match all relationships that start with a node with the label `A` and end with a node with the label `B`: ++ +[source, cypher, role="noplay"] +---- +MATCH (:A)-[r]->(:B) RETURN r +---- ====== ===== -[role=label--new-2025.01 label--Cypher25] -[#_neo_clientnotification_cluster_serverunavailable] -=== Server is not available during `WAIT` command - -.Notification category details -[cols="<1s,<4"] -|=== -|Neo4j code -m|Neo.ClientNotification.Cluster.ServerNotAvailable -|Title -a|Server is not available. -|Description -a|Server `(%s)` at address `(%s)` is not available. -|Category -m|GENERIC -|GQLSTATUS code -m|01N82 -|Status description -a| -warn: server is not available. Server `${ name }` at address `${ address }` is not available. -|Classification -m|GENERIC -|SeverityLevel -m|WARNING -|=== - - -.One out of two servers is not available during `WAIT` command +.Binding a variable-length relationship variable more than once (when run on version 5.6 or newer) [.tabbed-example] ===== [.include-with-GQLSTATUS-code] @@ -5087,25 +5105,15 @@ Query:: + [source,cypher] ---- -CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count ---- -One notification is returned for each server in the cluster: - -Returned GQLSTATUS code:: -03N85 - -Returned status description:: -info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. - Returned GQLSTATUS code:: -01N82 +01N63 Returned status description:: -warn: server is not available. Server `ServerId\{0e020000}` at address `localhost:20026` is not available. - -Suggestions for improvement:: -Investigate the server to determine why it is not available. +warn: repeated relationship reference. +`r` is repeated in `()-[r*]->()<-[r*]-()`, which leads to no results. ====== [.include-with-neo4j--code] ====== @@ -5113,17 +5121,9 @@ Query:: + [source,cypher] ---- -CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT +MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count ---- -One notification is returned for each server in the cluster: - Description of the returned code:: -Server `ServerId\{0e010000}` at address `localhost:20025` has caught up. - -Description of the returned code:: -Server `ServerId\{0e020000}` at address `localhost:20026` is not available. - -Suggestions for improvement:: -Investigate the server to determine why it is not available. +A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated) ====== ===== From a043b57d2d7aa792ce0f4049bc6695c17746585d Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Wed, 11 Dec 2024 11:14:04 +0000 Subject: [PATCH 13/13] Update GQLSTATUS groups of codes as defined by Neo4j table --- modules/ROOT/pages/notifications/index.adoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/notifications/index.adoc b/modules/ROOT/pages/notifications/index.adoc index e78ff170..d096be59 100644 --- a/modules/ROOT/pages/notifications/index.adoc +++ b/modules/ROOT/pages/notifications/index.adoc @@ -128,12 +128,18 @@ The following table lists the Neo4j-defined groups of GQLSTATUS codes and their | 01N7[y] | Security warnings -| 03N9[y] -| Performance information +| 01N8[y] +| Topology warnings | 03N6[y] | Generic information +| 03N8[y] +| Topology information + +| 03N9[y] +| Performance information + | 00N5[y] | Unrecognized information under successful completion