sashapolo commented on code in PR #6839:
URL: https://github.com/apache/ignite-3/pull/6839#discussion_r2480321258


##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/segstore/IndexFileManager.java:
##########
@@ -120,20 +129,36 @@ class IndexFileManager {
         Files.createDirectories(indexFilesDir);
     }
 
+    void start() throws IOException {
+        try (Stream<Path> indexFiles = Files.list(indexFilesDir)) {
+            Iterator<Path> it = indexFiles.sorted().iterator();
+
+            while (it.hasNext()) {
+                recoverIndexFileMetas(it.next());
+            }
+        }
+    }
+
     Path indexFilesDir() {
         return indexFilesDir;
     }
 
     /**
      * Saves the given index memtable to a file.
+     *
+     * <p>Must only be called by the checkpoint thread.
      */
     Path saveIndexMemtable(ReadModeIndexMemTable indexMemTable) throws 
IOException {
-        String fileName = indexFileName(curFileOrdinal, 0);
+        return saveIndexMemtable(indexMemTable, ++curFileOrdinal);
+    }
+
+    Path saveIndexMemtable(ReadModeIndexMemTable indexMemTable, int 
fileOrdinal) throws IOException {
+        String fileName = indexFileName(fileOrdinal, 0);

Review Comment:
   The functionality regarding generations has not been implemented yet



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to