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

forced to use the master database when the transaction started in master-slave mode #5738

Closed
mylava opened this issue May 21, 2020 · 3 comments

Comments

@mylava
Copy link

mylava commented May 21, 2020

Question

I want to force the commands in a transaction to be executed in the master database in sharding-proxy.

I see that there is no implementation in the source code (version number: 4.0.0-release),so,I would like to ask if this feature is implemented in the newer version?

If the newer version doesn't have this feature, I'd like to implement it myself. Do you have any Suggestions?

If I were to expand myself, here's the idea,

If the command is "BeginTransactionStatement",the ” connectionId“ will be records into a cache,for the same connectionId after submission of SQL will be route to Master database to execute,utile the command this connection committed is "CommitStatement", after this command executed, the ” connectionId“ will be remove from cache.

That's the general idea,Please give advice or comments,thanks~

@nevereverever
Copy link

I have the same question.
Master-Slave mode cannot support transaction in proxy.

@mylava
Copy link
Author

mylava commented May 22, 2020

I have the same question.
Master-Slave mode cannot support transaction in proxy.

Is it not supported or not implemented?
Are there any problems implementing this functionality?

@terrymanu
Copy link
Member

Master-Slave mode cannot support transaction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants