Very glad to see this Golang project!I have two questions:1. Vitess introduces vtgate and vttablet between app and MySQL, and store sharding related data in zookeeper, So each query will first go to vtgate, which will acquire schema sharding rules from zookeeper, and then be routed to vttablet. I think network round trip cost is really a big overhead even in LAN, I have not do any performance tests, but I hesitate when I figure out the architecture.
2. Transaction related: How transaction within single shard is supported in Vitess? Our app is written in Golang, go-sql-driver(https://github.com/go-sql-driver/mysql/) is used, By reading the source code, I got that it implements transaction Begin() as 'START TRANSACTION', which do not contain sharding information, So I don't know which vttablet should receive and execute this sql command, I really want to know how Vitess do this, defer until the next sql command which includes sharding information? or switch on/off the autocommit variable?
--
You received this message because you are subscribed to the Google Groups "vitess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vitess+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
func (mc *mysqlConn) Begin() (driver.Tx, error) { if mc.netConn == nil { errLog.Print(ErrInvalidConn) return nil, driver.ErrBadConn } err := mc.exec("START TRANSACTION") if err == nil { return &mysqlTx{mc}, err }
return nil, err}Enter code here...