Skip to content

Conversation

@robsdedude
Copy link
Member

Fix connection hint timeout

The driver may receive a configuration hint from the server during connection setup. The hint is a timeout: if the driver is waiting for a response from the server but has not heard back within the timeout window, the driver shall assume the connection is dead. The server can send NOOP ping messages to reset the timer ticking on the client-side.

The driver applied this hint to both reads and writes. This PR changes it so that the hint, as intended, only applies to read operations on connections.

New write timeout configuraiton option

To avoid the driver hanging indefinitely on write operations, a new driver-level configuration option connection_write_timeout, which defaults to 30 seconds is introduced. As the name suggests, this timeout is applied to all write operations on connections.

## Fix connection hint timeout
The driver may receive a configuration hint from the server during connection
setup. The hint is a timeout: if the driver is waiting for a response from the
server but has not heard back within the timeout window, the driver shall assume
the connection is dead. The server can send `NOOP` ping messages to reset the
timer ticking on the client-side.

The driver applied this hint to both reads and writes. This PR changes it so
that the hint, as intended, only applies to read operations on connections.

## New write timeout configuraiton option
To avoid the driver hanging indefinitely on write operations, a new driver-level
configuration option `connection_write_timeout`, which defaults to `30 seconds`
is introduced. As the name suggests, this timeout is applied to all write
operations on connections.
@robsdedude robsdedude force-pushed the feat/tcp-write-timeout branch from eddc877 to c97a056 Compare July 28, 2025 07:54
Copy link
Contributor

@StephenCathcart StephenCathcart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks good to me

@robsdedude robsdedude marked this pull request as ready for review July 29, 2025 10:20
@robsdedude robsdedude merged commit a4d3f30 into neo4j:6.x Jul 29, 2025
21 checks passed
@robsdedude robsdedude deleted the feat/tcp-write-timeout branch July 29, 2025 12:15
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.

2 participants