前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >分布式一致性协议bug列表

分布式一致性协议bug列表

作者头像
drdrxp
发布2022-04-28 21:16:29
2300
发布2022-04-28 21:16:29
举报

开个坑, 记录下以往学习分布式paper时发现的bug, 或让人容易产生误会的点.

https://github.com/drmingdrmer/consensus-bugs

先填一个paxos的问题, 本不是一个bug, 但有很多人疑惑的问题:

(Trap) The Bug in Paxos Made Simple

代码语言:javascript
复制
1. P1 sends 'prepare 1' to AB
2.  Both AB respond P1 with a promise to not to accept any request numbered smaller than 1.\
    Now the status is: A(-:-,1) B(-:-,1) C(-:-,-)
3.  P1 receives the responses, then gets stuck and runs very slowly
4.  P2 sends 'prepare 100' to AB
5.  Both AB respond P2 with a promise to not to accept any request numbered smaller than 100.
    Now the status is: A(-:-,100) B(-:-,100) C(-:-,-)
6.  P2 receives the responses, chooses a value b and sends 'accept 100:b' to BC
7.  BC receive and accept the accept request, the status is: A(-:-,100) B(100:b,100) C(100:b,-).
    Note that proposal 100:b has been chosen.
8.  P1 resumes, chooses value a and sends 'accept 1:a' to BC
9.  B doesn't accept it, but C accepts it because C has never promise anything.
    Status is: A(-:-,100) B(100:b,100) C(1:a,-). The chosen proposal is abandon, Paxos fails.
Explanation:

Missed something in step 7. When C processes accept 100:b it sets its state to C(100:b,100). By accepting a value the node is also promising to not accept earlier values.

Sadly:

What's more I looked through several proprietary and open-source paxos implementations and they all had the bug submitted by the OP!

本文参与?腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2022-03-23,如有侵权请联系?cloudcommunity@tencent.com 删除

本文分享自 分布式研究小院 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与?腾讯云自媒体分享计划? ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Explanation:
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
http://www.vxiaotou.com