Enforce CLIENT_DEPRECATE_EOF
capability match for fast-forward
sessions
#4819
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR ensures that a mismatch between frontend and backend connections can't take place for
CLIENT_DEPRECATE_EOF
capability. This is enforced with checks for two different scenarios:or acquiring backend conns for 'fast-forward' sessions.
connections for regular sessions, a mismatch between client and
backend capabilities is possible. A verification has been introduced
when a session switches to 'fast-forward', in case of capabilities
mismatch, an error is logged and client disconnected.
This PR also introduced a test that can serve as a guide when further testing capabilities matching. The test design is based is based on possibilities exploration on the scenarios that can be found in the connection pool. The higher degree of verbosity of the test can also serve as reference for other tests that require inspecting many
ProxySQL
internals for their checks.