Tencent / phxpaxos

The Paxos library implemented in C++ that has been used in the WeChat production environment.
Other
3.36k stars 863 forks source link

checkpoint机制是不是与多个group不好同时采用?因为多个group的话,每个group都有自己的镜像数据,新机器加入的话,难道每个group都要从旧机器接收镜像追赶进度,而每个group学完都会退出进程 #177

Closed jettchen00 closed 4 years ago

lynncui00 commented 4 years ago

For better generality to phxpaxos,we need to consider a situation that different group with different state machine, so every group's logic must be independent. (include checkpoint logic)

For your case, there's a way to fix it, not very difficult.

  1. Because each group is in the same process, each group can communicate easily.
  2. Write some logic in StateMachine::LoadCheckpointState, to let the group that finishes first wait for other groups. For example, sleep.
jettchen00 commented 4 years ago

thanks