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

Resolves #3583 - Session fast forward enabled when COM_BINLOG_DUMP_GTID is received #3807

Merged
merged 8 commits into from Jan 27, 2023

Conversation

jaredev
Copy link
Contributor

@jaredev jaredev commented Mar 2, 2022

Resolves Issue 3583

Enables session fast forwarding if the COM_BINLOG_DUMP_GTID command is received.

@jaredev
Copy link
Contributor Author

jaredev commented Mar 2, 2022

Here are the basic changes for this. TBD if any cleanup or other changes are needed when changing the state of the session in this way. Feedback appreciated.

@jaredev jaredev changed the title V2.x 3583 Resolves #3583 - Session fast forward enabled when COM_BINLOG_DUMP_GTID is received Mar 2, 2022
@renecannao
Copy link
Contributor

This needs a way for testing it consistently.
Probably it is enough to create a test that starts mysqlbinlog with --read-from-remote-server, using the replication user and connecting to proxysql where the same user is not configured with fast_forward

@pondix
Copy link
Contributor

pondix commented Mar 10, 2022

Automated message: PR pending admin approval for build testing

@mirostauder
Copy link
Collaborator

retest this please

* Added COM_BINLOG_DUMP_GTID command to enum_mysql_commands with value 30 (0x1e) based on https://dev.mysql.com/doc/internals/en/com-binlog-dump-gtid.html
* If the COM_BINLOG_DUMP_GTID is received, a warning is logged, and then the session_fast_foward is set to true
javsanpar and others added 4 commits January 13, 2023 10:06
For commands BINLOG_DUMP, BINLOG_DUMP_GTID and REGISTER_SLAVE a lot of
the features provided by ProxySQL aren't useful, like multiplexing,
query parsing, etc. For this reason, ProxySQL enable fast_forward when
it receives these commands.
This test runs a custom binlog client, that uses libslave, to test that
ProxySQL activates fast forward automatically after receiving the
command, and to test that it can read the binlog events. The custom
client reads the binlog after sending a query that do not disables
multiplexing and after sending a query that disables multiplexing.
@mirostauder
Copy link
Collaborator

retest this please

Fix honoring of 'connect_timeout_server_max' and
'connect_retries_on_failure' for 'fast_forward' sessions created by
'MYSQL_COM_BINLOG_DUMP' when session still doesn't own a backend
connection.
@renecannao renecannao marked this pull request as ready for review January 27, 2023 12:22
@renecannao renecannao merged commit c350aa6 into v2.x Jan 27, 2023
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.

Handle command COM_BINLOG_DUMP_GTID
6 participants