Our Way of Resolving the “Phantom Resurgence” Problem in Distributed Systems

Introduction

1) The “Phantom Resurgence” Problem

  • Case 1: For log 6, if A goes through basic Paxos again, A will find a log 6 with a greater proposeID. Therefore, log 6 on the local node is discarded, and the log that is approved by the majority is accepted.
  • Case 2: For logs 7 to 10, the majority does not complete any valid placements, and therefore A uses random local logs to propose and form the majority.
  • Case 3: Logs 11 to 19 do not complete any valid placements, so noop is used to fill in the gap.
  • Case 4: For log 20, the solution is the simplest. The log approved by the majority is accepted.

2) Use Multi-Paxos to Solve the “Phantom Resurgence” Problem

3) Use Raft to Solve the “Phantom Resurgence” Problem

3.1 About the Log Recovery of Raft

  • The maximum commitment principle ensures that no data is lost and none of the committed log entries are lost.
  • You cannot read any uncommitted data, because the service can only work properly after the majority of nodes accept and commit the noop log (so that it can be synchronized along with other logs from the previous term). Here, the noop log becomes a dividing line. Log entries before the noop log are submitted and logs entries after are discarded.

3.2 How Raft Solves the “Phantom Resurgence” Problem

4) Use Zab to Solve the “Phantom Resurgence” Problem

4.1 About the Log Recovery of Zab

  • The newly elected leader has the greatest zxID of all candidates in this round. You can also see it this way: This ensures that the leader has the latest data to the maximum extent.
  • The zxID used for comparison during the election of the leader is generated based on the committed data of each candidate.

4.2 How Zab Solves the “Phantom Resurgence” Problem

5. Further Discussion

References:

  1. In Search of an Understandable Consensus Algorithm by Diego Ongaro and John Ousterhout
  2. Paxos Made Simple by Leslie Lamport

Original Source:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com