当前位置:网站首页>分布式事务TCC浅析
分布式事务TCC浅析
2022-06-28 01:10:00 【May Hacker】
前言
之前学习过分布式事务中,有2PC、3PC协议。
TCC也是实现分布式事务的一种方式/协议,阿里开源的seata分布式事务中间件就支持TCC模式。
TCC介绍
TCC 指的是Try - Confirm - Cancel。
- Try 指的是预留,即资源的预留和锁定,注意是预留。
- Confirm 指的是确认操作,这一步其实就是真正的执行了。
- Cancel 指的是撤销操作,可以理解为把预留阶段的动作撤销了。
其实从思想上看和 2PC 差不多,都是先试探性的执行,如果都可以那就真正的执行,如果不行就回滚。
注意
值得注意的是,TCC中的三板斧方法需要业务方自己实现逻辑,比较难。
实现TCC逻辑的时候,需要注意幂等支持,因为在Confirm和Cancel的时候可能会出现重试。
边栏推荐
- Usage differences between isempty and isblank
- [fuzzy neural network] simulation of fuzzy neural network based on MATLAB
- Win11如何关闭最近打开项目?Win11关闭最近打开项目的方法
- PSM总结
- 如何开启多语言文本建议?Win11打开多语言文本建议的方法
- How to realize red, green and yellow traffic lights in ros+gazebo?
- CRF+BiLSTM代码分步骤解读
- JDBC与MySQL数据库
- StaticLayout的使用详解
- "Dadao Zhichuang" won a ten million prea+ round of financing and launched a technology consumption robot
猜你喜欢

Opencv——霍夫变换以及遇到的一些问题

转载文章:数字经济催生强劲算力需求 英特尔发布多项创新技术挖掘算力潜能

【历史上的今天】6 月 6 日:世界 IPv6 启动纪念日;《俄罗斯方块》发布;小红书成立

Win11不能拖拽圖片到任務欄軟件上快速打開怎麼辦

isEmpty 和 isBlank 的用法区别

毕业季来临,2022届高校毕业生人数首次突破千万大关

Initial linear regression
![[today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established](/img/06/895913d2c54b03cde86b3116955a9e.png)
[today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established
![[today in history] June 1: Napster was founded; MS-DOS original author was born; Google sells Google SketchUp](/img/fe/497eab2ac4a762298e71d28ed26e41.png)
[today in history] June 1: Napster was founded; MS-DOS original author was born; Google sells Google SketchUp

How does win11 close recently opened projects? Win11 method to close recently opened projects
随机推荐
JDBC and MySQL databases
Mixed programming of C language and assembly language in stm32
Flask Foundation: template inheritance + static file configuration
字节跳动面试官:一张图片占据的内存大小是如何计算
Win11如何关闭最近打开项目?Win11关闭最近打开项目的方法
win11如何添加打印机和扫描仪?win11添加打印机和扫描仪的设置
【历史上的今天】6 月 2 日:苹果推出了 Swift 编程语言;电信收购联通 C 网;OS X Yosemite 发布
【历史上的今天】6 月 10 日:Apple II 问世;微软收购 GECAD;发明“软件工程”一词的科技先驱出生
如何开启多语言文本建议?Win11打开多语言文本建议的方法
英特尔锐炫A380显卡即将在中国面市
Win11新建不了文本文档?Win11右键无法新建文本文档的解决方法
math_(函数&数列)极限的含义&误区和符号梳理/邻域&去心邻域&邻域半径
在线JSON转PlainText工具
The horizontal scrolling recycleview displays five and a half in one screen, which is lower than the five average distributions
[today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper
【历史上的今天】6 月 8 日:万维网之父诞生;PHP 公开发布;iPhone 4 问世
[2D code image correction and enhancement] simulation of 2D code image correction and enhancement processing based on MATLAB
[today in history] June 7: kubernetes open source version was released; Worldofwarcraft landed in China; Birth of the inventor of packet switching network
Is it safe for qiniu to open an account? How do I open an account online?
【云原生】-Docker安装部署分布式数据库 OceanBase