-
微服务的系统A和原来的老系统B连同一个数据库,A系统使用seata的AT模式做分布式事务,B是单体,考虑到A和B都可能对同一张表进行更新,那么即使在A系统中对该表的更新操作都做了@GlobalTransactional,@GlobalLock处理,那么仍可能出现脏写,在不对B系统做修改的情况下,如何比较好的处理这种情况呢 |
Beta Was this translation helpful? Give feedback.
Answered by
slievrly
May 19, 2023
Replies: 1 comment
-
脏写出现在在同一个事务周期内对同一个表主键id进行DML且是回滚操作。如果必须是要用AT模式,考虑A在业务执行时序上错开与B的执行。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
yili001
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
脏写出现在在同一个事务周期内对同一个表主键id进行DML且是回滚操作。如果必须是要用AT模式,考虑A在业务执行时序上错开与B的执行。