From 3262996b0fc5c85440af32e516dff53b9f98c182 Mon Sep 17 00:00:00 2001 From: Lasse Heemann Date: Wed, 11 Dec 2024 09:16:29 +0100 Subject: [PATCH] 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 f1e571e..1d07adf 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) ====== =====