Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-620

[Distributed] Add the ability to persist and maintain voteFor for the raft node and amend the judgment conditions for elections

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • None
    • None
    • Core/Cluster

    Description

      This is the quote from raft's paper.

      Raft servers must persist enough information to stable storage to survive server restarts safely. In particular, each server persists its current term and vote; this is necessary to prevent the server from voting twice in the same term or replacing log entries from a newer leader with those from a deposed leader. Each server also persists new log entries before they are counted towards the entries’ commitment; this prevents committed entries from being lost or “uncommitted” when servers restart.

      Therefore, the persistence of voteFor is important to ensure the security of the system.

      In addition, some judgment logic of the election module is inconsistent with that described in the paper, which may lead to bugs in some corner cases. Therefore, it is very important to correct the implementation method described in the paper.

      It will be the work of this issue to implement the voteFor persistence and fix some election logic.

      Attachments

        Issue Links

          Activity

            People

              LebronAl Tan xinyu
              LebronAl Tan xinyu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2m
                  2m
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 96h
                  96h