apache / shardingsphere-example

Sharding-Sphere examples
Apache License 2.0
974 stars 731 forks source link

By default, in sharding-jdbc, "select ...... for update" is routed to slave datasource. #202

Closed songjiesdnu closed 4 years ago

songjiesdnu commented 4 years ago

Question

In our application, there are some uses of "select ...... for update", when we use sharding-jdbc, these sqls is routed to the slave datasource, which is set read-only, and thus these sqls cannot be exeucted. We solve the problem by using HintManager and setMasterRouteOnly。

My question is, why sharding-jdbc do not route "select ...... for update" to master datasouce by default?

terrymanu commented 4 years ago

What is you version?

terrymanu commented 4 years ago

Closed for no response anymore