phxpaxos icon indicating copy to clipboard operation
phxpaxos copied to clipboard

The Paxos library implemented in C++ that has been used in the WeChat production environment.

Results 77 phxpaxos issues
Sort by recently updated
recently updated
newest added

changes: * remove submodule gmock * remove submodule protobuf * add submodule googletest v1.10.0 to third_party/googletest * add submodule grpc v1.37.0 to third_party/grpc * update submodule leveldb to v1.23 *...

Fix some of the typos in comments.

phxkv 依赖的的是哪个grpc 版本啊 ,会不会和 子目录下的 protobuf 冲突

What is the status of this project? There haven't been any updates for years. Is it abondoned?

Increase the number of renewals in a lease time, increase the success rate of renewal, and reduce the master switch.

checkpoint 接收新的状态机流程 //清空paxos_log 日志 I0630 09:04:03.638077 5242 logger_google.cpp:111]  Showy(0): PN8phxpaxos8InstanceE::OnReceiveCheckpointMsg Now.InstanceID 737 MsgType 1 Msg.from_nodeid 72058139498785641 My.nodeid 72058139498785639 flag 1 uuid 72058141452437945 sequence 0 checksum 0 offset 0 buffsize...

如题。在AskforcheckpointMode模式下,Instance::OnReceive会忽略所有的paxos消息,然而OnTimeout却没有忽略。在如下事件发生时会导致问题: 1、一个节点N正常启动,instance处于非常落后的状态,设其当前instance id为x。 2、N收到一个新的propose请求并进行了处理(prepare+accept)。 3、N通过AskforLearn发现自己落后,并开始传输chekcpoint。 4、在checkpoint传输过程中,prepare超时,通过OnTimeout进行了第二次prepare+accept。此时,paxos存储中应该是完全空的,但由于该问题被意外写入了一个记录。 5、checkpoint传输完成。N重启。 6、重启后成功加载checkpoint。 7、paxos初始化,发现当前日志里最大的instance id是x,而checkpoint的instance id远大于x,触发保护逻辑,paxos初始化失败。

1. CheckpointSender 启动后的线程回收 , checkpoint_sender.cpp stop函数内部的条件 if (m_bIsStarted && ! m_bIsEnded) { m_bIsEnd = true; join(); } 需要改为 if (m_bIsStarted ) { m_bIsEnd = true; join(); } m_bIsEnded初始状态为false,结束为true,都有可能导致不能正常退出线程

假设一开始节点的信息为:127.0.0.1:10000,集群成员只有本机127.0.0.1:10000;paxos重启之后节点信息变更为127.0.0.1:30000,然而集群成员由于固化在本地所以还是只有127.0.0.1:10000,这时调用ChangeMember去改变集群成员,但是会返回PaxosTryCommitRet_Im_Not_In_Membership错误码,原因是127.0.0.1:30000没有在集群成员列表中,没法去发起propose操作,那么在这种情况下感觉已经没有办法去改变集群成员信息了,咨询下还有其他解决方案可以支持这种场景吗?