Skip to content
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

Enforce CLIENT_DEPRECATE_EOF capability match for fast-forward sessions #4819

Open
wants to merge 8 commits into
base: v3.0
Choose a base branch
from

Conversation

JavierJF
Copy link
Collaborator

@JavierJF JavierJF commented Feb 5, 2025

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:

  • Ensures matching for 'CLIENT_DEPRECATE_EOF' capability when creating
    or acquiring backend conns for 'fast-forward' sessions.
  • Since 'CLIENT_DEPRECATE_EOF' capability isn't enforced on backend
    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.

- Ensures matching for 'CLIENT_DEPRECATE_EOF' capability when creating
  or acquiring backend conns for 'fast-forward' sessions.
- Since 'CLIENT_DEPRECATE_EOF' capability isn't enforced on backend
  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.
…lclient'

Using both libraries allows to test the compatibility of 'fast-forward'
sessions for SQLite3 sessions.
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