Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Galera read-write split - SET instructions should execute in both backend connections #653
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.
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.
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
MaxScale using r-w split
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.