分布式事务学习笔记

1. 强一致

  • 一致性协议
    • 两阶段提交 2PC
    • 三阶段提交 3PC
  • 落地方案
    • XA规范

2. 柔性事务

2.1. TCC

2.2. SAGA

2.2.1. SAGA 描述

2.2.2. SAGA架构

2.2.3. SAGA实现细节



2.2.4. SAGA流程图


2.2.5. 异常情况

https://e.naixuejiaoyu.com/live_pc/l_60d58980e4b057a4e7280ab0

3. 异步事务

3.1. 事务消息

3.2. 本地消息表


/** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ /* var disqus_config = function () { this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable }; */ (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = 'https://chenzz.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })();