You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/09/13 08:38:38 UTC

[GitHub] [iotdb] chengjianyun commented on a change in pull request #3939: init dummyIndex after restart cluster

chengjianyun commented on a change in pull request #3939:
URL: https://github.com/apache/iotdb/pull/3939#discussion_r707122448



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/log/manage/RaftLogManager.java
##########
@@ -125,6 +127,8 @@ protected RaftLogManager(StableEntryManager stableEntryManager, LogApplier appli
     long first = getCommittedEntryManager().getDummyIndex();
     long last = getCommittedEntryManager().getLastIndex();
     this.setUnCommittedEntryManager(new UnCommittedEntryManager(last + 1));
+    this.getUnCommittedEntryManager()
+        .truncateAndAppend(stableEntryManager.getAllEntriesAfterCommittedIndex());

Review comment:
       In my opinion, it doesn't matter where the entries to be recovered. The recover progress won't affect the consistency of raft group. `CommitIndex` to be determined until the next new log appending the follower. If my understanding right, the `committed`  logs committed again in the same sequence won't break the correctness of IoTDB. We have no choice even though this is not a good one.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org