-
Notifications
You must be signed in to change notification settings - Fork 977
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
Galera read-write split - SET instructions should execute in both backend connections #653
Comments
I assume this is not documented properly, so surely it is documentation request. ProxySQL doesn't track user variable . Why ProxySQL can't send the ProxySQL tracks some session variables So, in your case, when you run These behaviors were tailored over a the needs of a real application in python (that uses If your application doesn't seem to work with this behavior please let me know, and I will see if it is something that can be tuned. Question: does your application uses different timezone in different connections? |
Thanks for the detailed explanation, Rene. Indeed, it makes sense and using a third rule to catch any variable in SELECT sentences will solve any problem I could have (hopefully). No, the application doesn't use different timezone. But the reporting applications do to present the dates in the client timezone, even though in the same connection. I will take a look to see if we can workaround that. |
You are welcome. As an alternative, you can add a rewrite rule in ProxySQL to rewrite |
Is there any way to link a complete transaction to the same backend server? Original MariaDB server
ProxySQL
MaxScale using r-w split
|
Francisco, Yes, there is a way to link a complete transaction to the same backend server: this is done using Although, the default is 0 (disabled), and this is intentional. More details below. MaxScale disables read/write split for a transaction, while ProxySQL doesn't (by default). While MaxScale does r/w split outside a transaction, ProxySQL does query routing no matter if there is a transaction or not. Note that r/w split is a subset of query routing.
|
Thanks again, transaction_persistent seems to do what I was expecting in the first place. I will take a deep look into all the possibilities than ProxySQL offers. |
|
Many thanks for the head ups, I will try it. |
Closing. |
Maybe this is not a bug, but I don't see how it can be achieved, a documentation request?
For valid read-write split "SET" session instructions should be executed in the read and write backend connections for the same session.
So the autocommit, charset, time_zone, or custom variables have the value expected.
In my configuration all non-SELECT instructions are being executed in hostgroup_id 0, and SELECT instructions in hostgroup_id 1. hostgroup_id 0 won't accept reads.
Configuration
The text was updated successfully, but these errors were encountered: