多实例重复发邮件

实例1 实例2
getList x=1  
for 取得一行n getList x=1
update n x=0 for 取得一行n
发邮件 update n x=0
  发邮件

 

 

实例1 实例2
getList x=1  
for 取得一行n getList x=1
res = update n x=0 where x=1 for 取得一行n
res = 1,发邮件 res = update n x=0 where x=1
事务提交 阻塞(注释1)
  res = 0, 不发邮件

 

注释1:阻塞的依据:讨论 update A set number=number+ ? where id=?的原子性 (含数据库原理)

 

posted on 2021-03-09 19:55  silyvin  阅读(104)  评论(0编辑  收藏  举报