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 03:27:24 UTC

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

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



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/log/manage/serializable/SyncLogDequeSerializer.java
##########
@@ -236,6 +237,24 @@ public LogManagerMeta getMeta() {
     return getLogs(meta.getMaxHaveAppliedCommitIndex(), meta.getCommitLogIndex());
   }
 
+  /**
+   * Recover un-committed logs but already persistent. Maybe,we can extract

Review comment:
       > This persistence strategy needs to be improved, such as persisting uncommitted logs to ensure that some of raft's corner cases are correct. But in currrent logic, this function doesn't seem to be working?
   
   In fact, this part of the change is due to the meta information was not flushed in time. When we flush the log file, we don't flush the `LogManagerMeta` at the same time(see [#3930](https://github.com/apache/iotdb/pull/3930)).And we can't be sure that log and meta files are in perfect sync.Therefore, we need to start up with meta information as a baseline for recovery  
   




-- 
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