Skip to content

Fix: re-auth interfering with connectivity checks #1144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

robsdedude
Copy link
Member

@robsdedude robsdedude commented Feb 18, 2025

Connections might have pipelined messages when being picked up from the pool (e.g., re-auth). When unflushed, those connections will be RESET when returned to the pool. This results in pipelineing LOGON, LOGOFF, and RESET where the RESET will skip the queue on the server side. Depending on the timing, this will leave the connection in an undesirable state (e.g., unauthenticated).

This PR circumvents this situation by acquiring an unprepared connection from the pool when performing connectivity checks. Such connections will not have any work pipelined.

Connections might have pipelined messages when being picked up from the pool
(e.g., re-auth). When unflushed those, they will be `RESET` when returned to
the pool. This results in pipelineing `LOGON`, `LOGOFF`, and `RESET` where the
`RESET` will skip the queue on the server side. Depending on the timing, this
will leave the connection in an undesirable state (e.g., unauthenticated).

This PR circumvents this situation by acquiring an unprepared connection from
the pool when performing connectivity checks. Such connections will not have any
work pipelined.
@robsdedude robsdedude marked this pull request as draft February 18, 2025 08:05
@robsdedude robsdedude marked this pull request as ready for review February 26, 2025 19:11
Copy link
Contributor

@MaxAake MaxAake left a comment

Choose a reason for hiding this comment

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

👍🏻 🫀 👨🏻‍⚕️

@robsdedude robsdedude merged commit 84af084 into neo4j:5.0 Feb 27, 2025
20 checks passed
@robsdedude robsdedude deleted the fix/flush-connection-on-connectivity-checks branch February 27, 2025 15:32
@AndyHeap-NeoTech
Copy link
Contributor

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.

3 participants