Skip to content

Enforce CLIENT_DEPRECATE_EOF capability match for fast-forward sessions#4819

Merged
renecannao merged 12 commits intov3.0from
v3.0-ff_conns_eof_caps_match
May 12, 2025
Merged

Enforce CLIENT_DEPRECATE_EOF capability match for fast-forward sessions#4819
renecannao merged 12 commits intov3.0from
v3.0-ff_conns_eof_caps_match

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.
@renecannao
Copy link
Contributor

retest this please

@renecannao
Copy link
Contributor

Retest this please

@renecannao
Copy link
Contributor

@JavierJF : please perform a final review before merging

@JavierJF
Copy link
Collaborator Author

JavierJF commented Apr 9, 2025

Retest this please.

@renecannao
Copy link
Contributor

Can one of the admins verify this patch?

@JavierJF
Copy link
Collaborator Author

Retest this please.

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