vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.19k stars 2.06k forks source link

Question: the plan to support distributed transaction. #15470

Open hotjump opened 3 months ago

hotjump commented 3 months ago

Question

https://vitess.io/docs/resources/roadmap/

hi, vitess have a plan to enhance distributed transaction in the roadmap. Vitess have supported 2pc in the past, and guarantee atomicity. Will vitess support Isolation and global transaction id in the future, and do you have more detailed plan to introduce? thanks.

mattlord commented 3 months ago

I think that the noted roadmap document answers this question. There's no hard commitment to anything, but it's definitely something that we've wanted to do.

I'll let @deepthi comment as the project lead.

deepthi commented 3 months ago

What Matt said. We do want to eventually improve distributed transaction support. The current 2PC implementation is considered theoretically solid, but has not been tested in real production environments. It also has some UX problems in the sense that the coordinator has to be provided as a command line flag, making it inconvenient and pretty much impossible to use in k8s type deployments where IP addresses are not stable across pod restarts. Having said that, if you would like to use it and provide feedback, that will be much appreciated. Or you could improve it by making a PR that changes vtgates so that they also register themselves in the topo with unique names, and change vttablets to take that unique name for the coordinator instead of an IP address. Ref: vttablet flag reference

      --twopc_coordinator_address string                                 address of the (VTGate) process(es) that will be used to notify of abandoned transactions.
hotjump commented 3 months ago

We plan to use it, and possibly make some improvement. Solving the UX problems seems urgent. Global transaction ID is not supported currently, and when to plan to support, what in my opinion is a important issue. I am afraid of doing same thing as you, and it is't necessarily. As a result, I'm curious what you want to do in the short term.