mysql二阶段提交
时间: 2023-08-26 16:17:10 浏览: 94
二阶段提交是为了保证 redo log 和 binlog 的逻辑一致性。当进行 crash recovery 时,如果 redo log 已经 commit,那就毫不犹豫地将事务提交。如果 redo log 处于 prepare 状态,则需要判断事务对应的 binlog 是否完整。如果完整,则提交事务。否则,事务回滚。这样可以确保 redo log 和 binlog 的数据是一致的。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [mysql之两阶段提交](https://blog.csdn.net/jbossjf/article/details/126216851)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [简单谈谈MySQL的两阶段提交](https://blog.csdn.net/qq_33591903/article/details/122030252)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文