Skip to content

Commit b207b1e

Browse files
Add notifications for WAIT commands (#231)
Depends on neo-technology/neo4j#28163 --------- Co-authored-by: Reneta Popova <[email protected]>
1 parent b5adada commit b207b1e

File tree

3 files changed

+324
-2
lines changed

3 files changed

+324
-2
lines changed

modules/ROOT/pages/changelogs.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
:description: This page lists all changes to status codes per Neo4j version.
22
= Changes to status codes per Neo4j version
33

4+
== Neo4j 2025.01
5+
**New:**
6+
[source, status codes, role="noheader"]
7+
-----
8+
Neo.ClientNotification.Cluster.ServerNotAvailable
9+
Neo.ClientNotification.Cluster.ServerCatchingUp
10+
Neo.ClientNotification.Cluster.ServerFailed
11+
Neo.ClientNotification.Cluster.ServerCaughtUp
12+
-----
13+
Starting from 2025.01, when using Cypher25, queries using `WAIT` return the notifications listed above instead of result rows.
14+
The behaviour for Cypher5 remains unchanged.
15+
416
== Neo4j 5.25
517

618
Starting from 5.25, the query log includes the GQL error information under the JSON object `errorInfo`.

modules/ROOT/pages/notifications/all-notifications.adoc

Lines changed: 304 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3939,6 +3939,310 @@ The requested topology matched the current topology. No allocations were changed
39393939
======
39403940
=====
39413941

3942+
[role=label--new-2025.01 label--Cypher25]
3943+
[#_neo_clientnotification_cluster_servercaughtup]
3944+
=== Server has caught up during `WAIT` command
3945+
3946+
.Notification category details
3947+
[cols="<1s,<4"]
3948+
|===
3949+
|Neo4j code
3950+
m|Neo.ClientNotification.Cluster.ServerCaughtUp
3951+
|Title
3952+
a|Server has caught up.
3953+
|Description
3954+
a|Server `(%s)` at address `(%s)` has caught up.
3955+
|Category
3956+
m|TOPOLOGY
3957+
|GQLSTATUS code
3958+
m|03N85
3959+
|Status description
3960+
a|
3961+
info: server has caught up. Server `${ name }` at address `${ address }` has caught up.
3962+
|Classification
3963+
m|TOPOLOGY
3964+
|SeverityLevel
3965+
m|INFORMATION
3966+
|===
3967+
3968+
.Successful completion of a `WAIT` command with two servers
3969+
[.tabbed-example]
3970+
=====
3971+
[.include-with-GQLSTATUS-code]
3972+
======
3973+
Query::
3974+
+
3975+
[source,cypher]
3976+
----
3977+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
3978+
----
3979+
3980+
One notification is returned for each server in the cluster:
3981+
3982+
Returned GQLSTATUS code::
3983+
03N85
3984+
3985+
Returned status description::
3986+
info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up.
3987+
3988+
Returned GQLSTATUS code::
3989+
03N85
3990+
3991+
Returned status description::
3992+
info: server has caught up. Server `ServerId\{0e020000}` at address `localhost:20026` has caught up.
3993+
======
3994+
[.include-with-neo4j--code]
3995+
======
3996+
Query::
3997+
+
3998+
[source,cypher]
3999+
----
4000+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4001+
----
4002+
One notification is returned for each server in the cluster:
4003+
4004+
Description of the returned code::
4005+
Server `ServerId\{0e010000}` at address `localhost:20025` has caught up.
4006+
4007+
Description of the returned code::
4008+
Server `ServerId\{0e020000}` at address `localhost:20026` has caught up.
4009+
======
4010+
=====
4011+
4012+
[role=label--new-2025.01 label--Cypher25]
4013+
[#_neo_clientnotification_cluster_serverfailed]
4014+
=== Server failed during `WAIT` command
4015+
4016+
.Notification category details
4017+
[cols="<1s,<4"]
4018+
|===
4019+
|Neo4j code
4020+
m|Neo.ClientNotification.Cluster.ServerFailed
4021+
|Title
4022+
a|Server failed.
4023+
|Description
4024+
a|Server `(%s)` at address `(%s)` failed: (%s)
4025+
|Category
4026+
m|TOPOLOGY
4027+
|GQLSTATUS code
4028+
m|01N80
4029+
|Status description
4030+
a|
4031+
warn: server failed. Server `${ name }` at address `${ address }` failed: `${ message }`
4032+
|Classification
4033+
m|TOPOLOGY
4034+
|SeverityLevel
4035+
m|WARNING
4036+
|===
4037+
4038+
4039+
.One out of two servers failed during `WAIT` command
4040+
[.tabbed-example]
4041+
=====
4042+
[.include-with-GQLSTATUS-code]
4043+
======
4044+
Query::
4045+
+
4046+
[source,cypher]
4047+
----
4048+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4049+
----
4050+
4051+
One notification is returned for each server in the cluster:
4052+
4053+
Returned GQLSTATUS code::
4054+
03N85
4055+
4056+
Returned status description::
4057+
info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up.
4058+
4059+
Returned GQLSTATUS code::
4060+
01N80
4061+
4062+
Returned status description::
4063+
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: <...>
4064+
4065+
Suggestions for improvement::
4066+
Investigate the failing server using the provided message.
4067+
======
4068+
[.include-with-neo4j--code]
4069+
======
4070+
Query::
4071+
+
4072+
[source,cypher]
4073+
----
4074+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4075+
----
4076+
One notification is returned for each server in the cluster:
4077+
4078+
Description of the returned code::
4079+
Server `ServerId\{0e010000}` at address `localhost:20025` has caught up.
4080+
4081+
Description of the returned code::
4082+
Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...>
4083+
4084+
Suggestions for improvement::
4085+
Investigate the failing server using the provided message.
4086+
======
4087+
=====
4088+
4089+
[role=label--new-2025.01 label--Cypher25]
4090+
[#_neo_clientnotification_cluster_servercatchingup]
4091+
=== Server is still catching up during `WAIT` command
4092+
4093+
.Notification category details
4094+
[cols="<1s,<4"]
4095+
|===
4096+
|Neo4j code
4097+
m|Neo.ClientNotification.Cluster.ServerCachingUp
4098+
|Title
4099+
a|Server is still catching up.
4100+
|Description
4101+
a|Server `(%s)` at address `(%s)` is still catching up.
4102+
|Category
4103+
m|TOPOLOGY
4104+
|GQLSTATUS code
4105+
m|01N81
4106+
|Status description
4107+
a|
4108+
warn: server is catching up. Server `${ name }` at address `${ address }` is still catching up.
4109+
|Classification
4110+
m|TOPOLOGY
4111+
|SeverityLevel
4112+
m|WARNING
4113+
|===
4114+
4115+
4116+
.One out of two servers is still catching up during `WAIT` command
4117+
[.tabbed-example]
4118+
=====
4119+
[.include-with-GQLSTATUS-code]
4120+
======
4121+
Query::
4122+
+
4123+
[source,cypher]
4124+
----
4125+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4126+
----
4127+
4128+
One notification is returned for each server in the cluster:
4129+
4130+
Returned GQLSTATUS code::
4131+
03N85
4132+
4133+
Returned status description::
4134+
info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up.
4135+
4136+
Returned GQLSTATUS code::
4137+
01N81
4138+
4139+
Returned status description::
4140+
warn: server is catching up. Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up.
4141+
4142+
Suggestions for improvement::
4143+
This behaviour indicates that one of the servers is lagging behind.
4144+
Investigate the server and network for performance issues or increase the wait timeout.
4145+
======
4146+
[.include-with-neo4j--code]
4147+
======
4148+
Query::
4149+
+
4150+
[source,cypher]
4151+
----
4152+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4153+
----
4154+
One notification is returned for each server in the cluster:
4155+
4156+
Description of the returned code::
4157+
Server `ServerId\{0e010000}` at address `localhost:20025` has caught up.
4158+
4159+
Description of the returned code::
4160+
Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up.
4161+
4162+
Suggestions for improvement::
4163+
This behaviour indicates that one of the servers is lagging behind.
4164+
Investigate the server and network for performance issues or increase the wait timeout.
4165+
======
4166+
=====
4167+
4168+
[role=label--new-2025.01 label--Cypher25]
4169+
[#_neo_clientnotification_cluster_serverunavailable]
4170+
=== Server is not available during `WAIT` command
4171+
4172+
.Notification category details
4173+
[cols="<1s,<4"]
4174+
|===
4175+
|Neo4j code
4176+
m|Neo.ClientNotification.Cluster.ServerNotAvailable
4177+
|Title
4178+
a|Server is not available.
4179+
|Description
4180+
a|Server `(%s)` at address `(%s)` is not available.
4181+
|Category
4182+
m|TOPOLOGY
4183+
|GQLSTATUS code
4184+
m|01N82
4185+
|Status description
4186+
a|
4187+
warn: server is not available. Server `${ name }` at address `${ address }` is not available.
4188+
|Classification
4189+
m|TOPOLOGY
4190+
|SeverityLevel
4191+
m|WARNING
4192+
|===
4193+
4194+
4195+
.One out of two servers is not available during `WAIT` command
4196+
[.tabbed-example]
4197+
=====
4198+
[.include-with-GQLSTATUS-code]
4199+
======
4200+
Query::
4201+
+
4202+
[source,cypher]
4203+
----
4204+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4205+
----
4206+
4207+
One notification is returned for each server in the cluster:
4208+
4209+
Returned GQLSTATUS code::
4210+
03N85
4211+
4212+
Returned status description::
4213+
info: server has caught up. Server `ServerId\{0e010000}` at address `localhost:20025` has caught up.
4214+
4215+
Returned GQLSTATUS code::
4216+
01N82
4217+
4218+
Returned status description::
4219+
warn: server is not available. Server `ServerId\{0e020000}` at address `localhost:20026` is not available.
4220+
4221+
Suggestions for improvement::
4222+
Investigate the server to determine why it is not available.
4223+
======
4224+
[.include-with-neo4j--code]
4225+
======
4226+
Query::
4227+
+
4228+
[source,cypher]
4229+
----
4230+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4231+
----
4232+
One notification is returned for each server in the cluster:
4233+
4234+
Description of the returned code::
4235+
Server `ServerId\{0e010000}` at address `localhost:20025` has caught up.
4236+
4237+
Description of the returned code::
4238+
Server `ServerId\{0e020000}` at address `localhost:20026` is not available.
4239+
4240+
Suggestions for improvement::
4241+
Investigate the server to determine why it is not available.
4242+
======
4243+
=====
4244+
4245+
39424246
[#_schema_notifications]
39434247
== `SCHEMA` category
39444248

modules/ROOT/pages/notifications/index.adoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,18 @@ The following table lists the Neo4j-defined groups of GQLSTATUS codes and their
128128
| 01N7[y]
129129
| Security warnings
130130

131-
| 03N9[y]
132-
| Performance information
131+
| 01N8[y]
132+
| Topology warnings
133133

134134
| 03N6[y]
135135
| Generic information
136136

137+
| 03N8[y]
138+
| Topology information
139+
140+
| 03N9[y]
141+
| Performance information
142+
137143
| 00N5[y]
138144
| Unrecognized information under successful completion
139145

0 commit comments

Comments
 (0)