-
Notifications
You must be signed in to change notification settings - Fork 986
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
The timestamp set in SET TIMESTAMP
calls is seen by other connections
#2033
Comments
Hi @davidscholberg . Note that disabling multiplexing doesn't automatically disable routing, so if a client run Nonetheless, I think this issue must be considered a bug, because although proxysql shouldn't track |
As a further note: when multiplexing is disabled, the backend connection is reset when the client disconnects, so no other client will see the timestamp set in the first client connection. |
@renecannao thank you for responding so quickly. I've tried disabling multiplexing globally with the following: update global_variables set variable_value = 'false' where variable_name = 'mysql-multiplexing';
LOAD MYSQL VARIABLES TO RUNTIME;
SAVE MYSQL VARIABLES TO DISK; But I'm still able to reproduce the above timestamp bug, even after restarting ProxySQL. Any ideas? Also, is there a non-disruptive way to get rid of the backend connection with the manually set timestamp? You mentioned in #2032 (comment) about purging the connection pool, but I'm not seeing how to do this anywhere. |
Fixed in 2.0.4 . |
I also tried disabling multiplexing by creating a query rule: INSERT INTO mysql_query_rules (active, match_digest, multiplex) VALUES ('1', '^SET TIMESTAMP=?', 0);
LOAD MYSQL QUERY RULES TO RUNTIME;
SAVE MYSQL QUERY RULES TO DISK; I confirmed that the query rule is being hit by looking at the I can file another bug report for this if you want, but tbh I'm not sure if this is a bug or if I'm just missing something. |
Re-opening, and I will try to reproduce disabling multiplexing with query rules |
I tried to reproduce the issue with the query rule listed above (slightly modified tho, @davidscholberg : either I missed something in reproducing it, or maybe the issue is only with 1.4 (I didn't try that version). |
@renecannao thank you for looking into this. I updated to 2.0.3 on a Debian Stretch box, and I was unable to reproduce the original issue after disabling multiplexing. However, I am able to reproduce the issue using 2.0.3 on Debian Jessie. I'm not sure if you are still supporting Jessie or not, but I figured I'd mention it in any case. |
@davidscholberg , are you sure you are following exactly the same steps? |
@renecannao yes I am following the same steps. I have verified that I am running 2.0.3:
I have also re-enabled multiplexing and then disabled it again both globally and through the query rule, but the bug still occurs (only on Jessie). |
(cherry picked from commit 350958c)
Just wanted to give an update. I was able to get the workaround working on a different jessie server, so it appears that this is not a jessie issue. However, I still can't get the workaround to work on the original server that I tested this on, even after purging and reinstalling several proxysql versions. |
@renecannao By way of update, I tested the workaround on multiple MySQL backends of two different versions (5.6 and 5.7). This was all tested from the same ProxySQL instance (version 1.4.14-percona-1.1) with |
When you issue a
SET TIMESTAMP
command through ProxySQL, other connections that didn't set any timestamp will see the manually set timestamp rather than the current one.Reproduction steps (tested on Debian 8, ProxySQL 1.4.14):
Run the following through ProxySQL:
You may need to run the last command a few times before you see the manually set timestamp. The above is not reproducible if you connect directly to the MySQL instance, which is expected behavior since the default scope of
SET
calls is session.It looks like this behavior may already be a known issue, but it's not obvious what the workaround is, if any. Do we need to disable multiplexing? What are the consequences of doing so?
The text was updated successfully, but these errors were encountered: