当前位置:网站首页>What is distributed transaction
What is distributed transaction
2022-06-22 07:50:00 【Hard working ant [if you]】
What is business
Database transactions ( abbreviation : Business ,Transaction) A logical unit in the execution of a database , It consists of a limited sequence of database operations [ It consists of multiple different operations of the current business logic ]. Transactions have the following four characteristics , It's used to be called ACID characteristic :1) Atomicity (Atomicity): The transaction is executed as a whole , The operations on the database contained in it are either all performed , Either not .2) Uniformity (Consistency): Transactions should ensure that the state of the database changes from one consistent state to another . Consistent state means that the data in the database should meet the integrity constraints . besides , Consistency has another layer of semantics , The intermediate state of a transaction cannot be observed ( It is also said that this layer of semantics should belong to atomicity ).3) Isolation, (Isolation): When multiple transactions are executed concurrently , The execution of one transaction should not affect the execution of other transactions , As if only this operation is being performed by the database .4) persistence (Durability): Changes made to the database by committed transactions should be persisted in the database . At the end of the transaction , This operation will be irreversible .
What is a local transaction
In a traditional single project , Transactions are limited to access control to a single database resource , After the service of Architecture , The concept of transactions extends to services . If we take a single service operation as a transaction , Then the whole service operation can only involve a single database resource , This kind of transaction is based on single service and single database resource access , It's called local affairs (Local Transaction). If the user orders an interface , It will involve inventory reduction 、 Add order .
Operating on the same database , Transaction control is possible , All or nothing , All or nothing .
What is distributed transaction
Distributed transaction refers to the participants of transaction 、 Servers that support transactions 、 Resource servers and transaction managers are located on different nodes of different distributed systems , And it's a different application , Distributed transactions need to ensure that either all of these operations succeed , All or nothing .

After distribution , There will be multiple databases , Multiple service communication , Such as : The inventory service was successfully executed , After deducting inventory , But the order service database hung up , The order cannot be added , This will lead to inconsistent data , Things will lose their meaning , Data cannot be rolled back based on other nodes .

And in response to this phenomenon , In essence , Distributed transaction is to ensure the data consistency of different databases .
边栏推荐
- 微信小游戏(五)
- mysql截取字符串CS0000_1中_后面的字符
- 报错 E: Unable to locate package sudo
- 【宋红康 MySQL数据库 】【高级篇】【06】MySQL的逻辑架构
- 网站的日常维护
- 模电实验——实验二 JFET共源极放大电路
- JS to assign values to two objects with the same attributes
- What are uniapp, wap2app and 5 + app in dccloud?
- Problems caused by canvas palette width and height and canvas width and height
- The applet uses the step bar vant steps in vant
猜你喜欢

XMIND 2022 mind map active resources?

对于mysql中数据为NULL引发的一些问题和思考

Multimedia architecture -- Introduction to display

Toyota bz4x canceled the launch conference. Even if the low-temperature charging problem does not exist, how about the product strength?

Backup the method of uploading babies in Taobao stores to multiple stores

Crmeb mall distribution function

navicat如何查询已连接的数据库密码信息

Remote Desktop Manager

mysql查询group by 1055 问题完美解决,最简单最便捷的方法

模电实验——实验一 晶体管共射极单管放大器
随机推荐
Qualcomm platform LCM summary
Symbolic processing of crash log
Phpcms mobile portal configuration
How to batch copy babies by sales volume in Taoying
A training summary of Intranet penetration test
6、 Scrollview component
Crmeb mall distribution function
Blob format problems involved in image uploading
Multimedia architecture -- Introduction to display
Some problems caused by null data in MySQL
[v4.3] the applet fails to receive the subscription message, and the coupon time on the product details page is displayed incorrectly
Scrollrect for tableview
Detailed explanation of subnet mask
User defined pop-up use
对于mysql中数据为NULL引发的一些问题和思考
[standard version 4.3] marketing activities (group bargaining second kill) error reporting under orders
【宋红康 MySQL数据库 】【高级篇】【06】MySQL的逻辑架构
IDEA连接不到SQLSSMS
模电实验——实验一 晶体管共射极单管放大器
Expérience électrique en mode - - expérience 2 circuit d'amplification de source commune JFET