You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/08/01 09:14:49 UTC

[GitHub] [incubator-shardingsphere] VitZhou opened a new issue #2796: select.....for update应该路由到master节点

VitZhou opened a new issue #2796: select.....for update应该路由到master节点
URL: https://github.com/apache/incubator-shardingsphere/issues/2796
 
 
   ## Feature Request
   
   select.....for update应该路由到master节点,在一般的业务场景下,使用for update是为了锁行,然后进行数据的修改.比如:
   @Transactional
   public void updateById(String id) {
         UserEntity byId = userDAO.findById(id);
         byId.setName("update"+byId.getName());
         userDAO.update(byId);
   }
   如果路由到slave节点的话无法起到锁住数据的效果.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services