了解原子事务 [英] Understanding Atomic Transactions
问题描述
我有一个场景。在原子事务中,需要执行多个操作。假设,第一个事务是在DB中更新表,第二个是将文件移动到某个位置,第三个是在不同的sql
服务器上更新表。
I have one scenario. within an atomic transaction, there are mulitple operations that needs to be performed. Suppose, first transaction is of updating table in DB, second operation of moving file to a location and third is updating table on different sql server.
在第三个时发生错误操作。现在会发生什么?此外,在发生错误的操作之后,将会执行的操作将会在所有操作或编排实例中执行。
There occurs an error at third operation. What will happen now? Also what will happen to operations after the operation at which error occured, will they be performed at all or orchestration instance will be suspended.
我的理解是前两个操作不会滚动背部。这是正确的吗?
My understanding says that the first two operations will not get roll back. Is it correct?
如果是,那么为什么我们说原子交易操作将完全完成其他回滚,没有中途。
If yes then why we say that in atomic transaction operation will complete fully else roll back, no halfway.
请清楚这一点场景和理解。谢谢。
Kindly clear this scenario and understanding. Thanks.
Ankur Seth
Ankur Seth
推荐答案
Richard Seroter在这个
中提供了你问题的最佳答案博客文章。请参阅它以获得答案。
The best answer to your question has been provided by Richard Seroter in this blog post. Refer to it for answer.
这篇关于了解原子事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!