Skip to content

Commit b329dd8

Browse files
committed
Add notifications for WAIT commands
1 parent 6571d3a commit b329dd8

File tree

2 files changed

+317
-0
lines changed

2 files changed

+317
-0
lines changed

modules/ROOT/pages/changelogs.adoc

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

4+
== Neo4j 2024.12
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 5.27, when using Cypher25, queries using `WAIT` will return the notifications listed above instead of result rows. The behaviour for Cypher5 remains unchanged.
14+
415
== Neo4j 5.25
516

617
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: 306 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4823,3 +4823,309 @@ Description of the returned code::
48234823
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)
48244824
======
48254825
=====
4826+
4827+
// TODO label for Cypher25?
4828+
[role=label--new-2024.12]
4829+
[#_neo_clientnotification_cluster_servercaughtup]
4830+
=== WAIT Server caught up
4831+
4832+
.Notification category details
4833+
[cols="<1s,<4"]
4834+
|===
4835+
|Neo4j code
4836+
m|Neo.ClientNotification.Cluster.ServerCaughtUp
4837+
|Title
4838+
a|Server is caught up.
4839+
|Description
4840+
a|Server `(%s)` at address `(%s)` is caught up.
4841+
|Category
4842+
m|GENERIC
4843+
|GQLSTATUS code
4844+
m|03N85
4845+
|Status description
4846+
a|
4847+
info: server is caught up. Server `${ name }` at address `${ address }` is caught up.
4848+
|Classification
4849+
m|GENERIC
4850+
|SeverityLevel
4851+
m|INFORMATION
4852+
|===
4853+
4854+
4855+
.Successful completion of a `WAIT` command with two servers
4856+
[.tabbed-example]
4857+
=====
4858+
[.include-with-GQLSTATUS-code]
4859+
======
4860+
Query::
4861+
+
4862+
[source,cypher]
4863+
----
4864+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4865+
----
4866+
4867+
One notification is returned for each server in the cluster:
4868+
4869+
Returned GQLSTATUS code::
4870+
03N85
4871+
4872+
Returned status description::
4873+
info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up.
4874+
4875+
Returned GQLSTATUS code::
4876+
03N85
4877+
4878+
Returned status description::
4879+
info: server is caught up. Server `ServerId\{0e020000}` at address `localhost:20026` is caught up.
4880+
======
4881+
[.include-with-neo4j--code]
4882+
======
4883+
Query::
4884+
+
4885+
[source,cypher]
4886+
----
4887+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4888+
----
4889+
One notification is returned for each server in the cluster:
4890+
4891+
Description of the returned code::
4892+
Server `ServerId\{0e010000}` at address `localhost:20025` is caught up.
4893+
4894+
Description of the returned code::
4895+
Server `ServerId\{0e020000}` at address `localhost:20026` is caught up.
4896+
======
4897+
=====
4898+
4899+
// TODO label for Cypher25?
4900+
[role=label--new-2024.12]
4901+
[#_neo_clientnotification_cluster_serverfailed]
4902+
=== WAIT Server failed
4903+
4904+
.Notification category details
4905+
[cols="<1s,<4"]
4906+
|===
4907+
|Neo4j code
4908+
m|Neo.ClientNotification.Cluster.ServerFailed
4909+
|Title
4910+
a|Server failed.
4911+
|Description
4912+
a|Server `(%s)` at address `(%s)` failed: (%s)
4913+
|Category
4914+
m|GENERIC
4915+
|GQLSTATUS code
4916+
m|01N80
4917+
|Status description
4918+
a|
4919+
warn: server failed. Server `${ name }` at address `${ address }` failed: `${ message }`
4920+
|Classification
4921+
m|GENERIC
4922+
|SeverityLevel
4923+
m|WARNING
4924+
|===
4925+
4926+
4927+
.One out of two servers failed during `WAIT` command
4928+
[.tabbed-example]
4929+
=====
4930+
[.include-with-GQLSTATUS-code]
4931+
======
4932+
Query::
4933+
+
4934+
[source,cypher]
4935+
----
4936+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4937+
----
4938+
4939+
One notification is returned for each server in the cluster:
4940+
4941+
Returned GQLSTATUS code::
4942+
03N85
4943+
4944+
Returned status description::
4945+
info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up.
4946+
4947+
Returned GQLSTATUS code::
4948+
01N80
4949+
4950+
Returned status description::
4951+
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: <...>
4952+
4953+
Suggestions for improvement::
4954+
Investigate the failing server using the provided message.
4955+
======
4956+
[.include-with-neo4j--code]
4957+
======
4958+
Query::
4959+
+
4960+
[source,cypher]
4961+
----
4962+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
4963+
----
4964+
One notification is returned for each server in the cluster:
4965+
4966+
Description of the returned code::
4967+
Server `ServerId\{0e010000}` at address `localhost:20025` is caught up.
4968+
4969+
Description of the returned code::
4970+
Server `ServerId\{0e020000}` at address `localhost:20026` failed: Caught up but has failure for DatabaseId{0db00002[foo]} Failure: java.nio.file.FileAlreadyExistsException: <...>
4971+
4972+
Suggestions for improvement::
4973+
Investigate the failing server using the provided message.
4974+
======
4975+
=====
4976+
4977+
// TODO label for Cypher25?
4978+
[role=label--new-2024.12]
4979+
[#_neo_clientnotification_cluster_servercatchingup]
4980+
=== WAIT Server catching up
4981+
4982+
.Notification category details
4983+
[cols="<1s,<4"]
4984+
|===
4985+
|Neo4j code
4986+
m|Neo.ClientNotification.Cluster.ServerCachingUp
4987+
|Title
4988+
a|Server is still catching up.
4989+
|Description
4990+
a|Server `(%s)` at address `(%s)` is still catching up.
4991+
|Category
4992+
m|GENERIC
4993+
|GQLSTATUS code
4994+
m|01N81
4995+
|Status description
4996+
a|
4997+
warn: server is catching up. Server `${ name }` at address `${ address }` is still catching up.
4998+
|Classification
4999+
m|GENERIC
5000+
|SeverityLevel
5001+
m|WARNING
5002+
|===
5003+
5004+
5005+
.One out of two servers is still catching up during `WAIT` command
5006+
[.tabbed-example]
5007+
=====
5008+
[.include-with-GQLSTATUS-code]
5009+
======
5010+
Query::
5011+
+
5012+
[source,cypher]
5013+
----
5014+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
5015+
----
5016+
5017+
One notification is returned for each server in the cluster:
5018+
5019+
Returned GQLSTATUS code::
5020+
03N85
5021+
5022+
Returned status description::
5023+
info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up.
5024+
5025+
Returned GQLSTATUS code::
5026+
01N81
5027+
5028+
Returned status description::
5029+
warn: server is catching up. Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up.
5030+
5031+
Suggestions for improvement::
5032+
This behaviour indicates that one of the servers is lagging behind. Investigate the server and network for performance issues or increase the wait timeout.
5033+
======
5034+
[.include-with-neo4j--code]
5035+
======
5036+
Query::
5037+
+
5038+
[source,cypher]
5039+
----
5040+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
5041+
----
5042+
One notification is returned for each server in the cluster:
5043+
5044+
Description of the returned code::
5045+
Server `ServerId\{0e010000}` at address `localhost:20025` is caught up.
5046+
5047+
Description of the returned code::
5048+
Server `ServerId\{0e020000}` at address `localhost:20026` is still catching up.
5049+
5050+
Suggestions for improvement::
5051+
This behaviour indicates that one of the servers is lagging behind. Investigate the server and network for performance issues or increase the wait timeout.
5052+
======
5053+
=====
5054+
5055+
// TODO label for Cypher25?
5056+
[role=label--new-2024.12]
5057+
[#_neo_clientnotification_cluster_serverunavailable]
5058+
=== WAIT Server not available
5059+
5060+
.Notification category details
5061+
[cols="<1s,<4"]
5062+
|===
5063+
|Neo4j code
5064+
m|Neo.ClientNotification.Cluster.ServerNotAvailable
5065+
|Title
5066+
a|Server is not available.
5067+
|Description
5068+
a|Server `(%s)` at address `(%s)` is not available.
5069+
|Category
5070+
m|GENERIC
5071+
|GQLSTATUS code
5072+
m|01N82
5073+
|Status description
5074+
a|
5075+
warn: server is not available. Server `${ name }` at address `${ address }` is not available.
5076+
|Classification
5077+
m|GENERIC
5078+
|SeverityLevel
5079+
m|WARNING
5080+
|===
5081+
5082+
5083+
.One out of two servers is not available during `WAIT` command
5084+
[.tabbed-example]
5085+
=====
5086+
[.include-with-GQLSTATUS-code]
5087+
======
5088+
Query::
5089+
+
5090+
[source,cypher]
5091+
----
5092+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
5093+
----
5094+
5095+
One notification is returned for each server in the cluster:
5096+
5097+
Returned GQLSTATUS code::
5098+
03N85
5099+
5100+
Returned status description::
5101+
info: server is caught up. Server `ServerId\{0e010000}` at address `localhost:20025` is caught up.
5102+
5103+
Returned GQLSTATUS code::
5104+
01N82
5105+
5106+
Returned status description::
5107+
warn: server is not available. Server `ServerId\{0e020000}` at address `localhost:20026` is not available.
5108+
5109+
Suggestions for improvement::
5110+
Investigate the server to determine why it is not available.
5111+
======
5112+
[.include-with-neo4j--code]
5113+
======
5114+
Query::
5115+
+
5116+
[source,cypher]
5117+
----
5118+
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES WAIT
5119+
----
5120+
One notification is returned for each server in the cluster:
5121+
5122+
Description of the returned code::
5123+
Server `ServerId\{0e010000}` at address `localhost:20025` is caught up.
5124+
5125+
Description of the returned code::
5126+
Server `ServerId\{0e020000}` at address `localhost:20026` is not available.
5127+
5128+
Suggestions for improvement::
5129+
Investigate the server to determine why it is not available.
5130+
======
5131+
=====

0 commit comments

Comments
 (0)