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
Added sticky flag realization #825
We've just moved to cloud, and started using XtraDB cluster. We've experienced some troubles with highload, so we opened couple of servers for read and write. But it also cause us some troubles like deadlocks. The possible solution for this was making one Cluster Node for write and others for readonly.
If I have rules, like:
Select will go through destination hostgroup, which includes readonly servers, which don't know about transaction yet, so I wouldn't get actual sum of deposits. And flagIN, flagOUT works only for each query separately.
So I've come up with an idea:
I added new parameter -
My version is not perfect, also I don't use C++ much, but we've tested it, and it is working like it supposed to.
@klinometr : thank you very much for the pull request!
I think the two approaches can live together, as they aren't mutually exclusive.
Few comments I have are:
Changed field according to our discussion. Changed a logic slightly.
@klinometr : thank you for the pull request. Looks good to me: merged.