Skip to content

Let a managed server finish coming up before giving up on it - #121

Merged
tamnd merged 1 commit into
mainfrom
bolt-ready
Aug 24, 2026
Merged

Let a managed server finish coming up before giving up on it#121
tamnd merged 1 commit into
mainfrom
bolt-ready

Conversation

@tamnd

@tamnd tamnd commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Part of #56. The managed container path was broken in two places and neither failure was the engine's.

First, the readiness wait dials the port, and a server binds its port well before it speaks its own protocol on one. For neo4j that gap is tens of seconds, so the first Ping got an EOF and the run ended with "neo4j: unreachable at bolt://127.0.0.1:32769 (is the server up?)" against a server that was up and starting. A session against a server this run launched now retries for up to ninety seconds. A server the operator supplied still gets one attempt, since that one is either up or not and waiting a minute and a half to say so helps nobody.

Second, the load resolves an import directory by asking the server and then falling back to local-install heuristics. On this machine the fallback found homebrew's import directory, wrote the CSV there, and asked a server inside a container to read it, which ended the load with Couldn't load the external resource at: file:///gb-3991357500.csv. The directory is now proved rather than assumed: one row is written carrying the file's own name and read back through the server, and a directory the server cannot see leaves importDir empty so the load falls back to UNWIND batching. That also covers the case nobody had hit yet, a local install that is not the server on the other end of the connection.

linkbench smoke now runs end to end against a managed neo4j container, all ten queries, and it is the first run to report what that server costs:

Class / Query   p50      p99
point-read      9.43ms   30.57ms
traversal       10.51ms  44.02ms
write           15.38ms  65.50ms

memory peak (sampled)    1.3 GiB
memory steady (sampled)  1.3 GiB
dataset on disk          552.8 KiB
store after load         516.0 MiB
store growth             3.1 KiB

The peak rss row for that same run reads 22.2 MiB, which is the Bolt driver in this process. That is the number the sampled rows replace.

go test ./... green, and the retry has unit tests over a stub engine so it does not need a container to be checked.

A run against a managed container failed twice over, and both failures
reported the engine as broken when the harness was the one at fault.

The readiness wait dials the port, and a server binds its port well before
it speaks its own protocol on one. For Neo4j that gap is tens of seconds,
so the first Ping got an EOF and the run ended saying the server was
unreachable. A session against a server this run launched now retries for
up to ninety seconds. A server the operator supplied still gets one
attempt: that one is either up or not.

Past that, the load picked an import directory by looking for a local
install, found this machine's homebrew one, wrote a CSV into it and asked
a server in a container to read it. The directory is now proved instead of
assumed, by writing one row and reading it back through the server, and a
directory the server cannot see falls back to UNWIND batching.

linkbench smoke now runs end to end against a managed neo4j container, all
ten queries, and with the sampler it is the first run to report what that
server costs: 1.3 GiB held and 516 MiB on disk for a 553 KiB dataset.
@tamnd
tamnd merged commit c899867 into main Aug 24, 2026
@tamnd
tamnd deleted the bolt-ready branch August 24, 2026 11:58
@tamnd tamnd mentioned this pull request Aug 24, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant