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?
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?