You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2022/03/24 08:45:04 UTC

[GitHub] [jackrabbit-oak] thomasmueller commented on a change in pull request #527: OAK-9721: Add state information while importing index

thomasmueller commented on a change in pull request #527:
URL: https://github.com/apache/jackrabbit-oak/pull/527#discussion_r834050056



##########
File path: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/importer/IndexImporter.java
##########
@@ -76,6 +78,10 @@
     private final IndexDefinitionUpdater indexDefinitionUpdater;
     private final boolean preserveCheckpoint = Boolean.getBoolean(OAK_INDEX_IMPORTER_PRESERVE_CHECKPOINT);
 
+    static final int RETRIES = Integer.parseInt(System.getProperty("oak.index.import.retries", "5"));

Review comment:
       FYI you could also use:
   
       Integer.getInteger("oak.index.import.retries", 5);

##########
File path: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/importer/IndexImporter.java
##########
@@ -90,72 +96,136 @@ public IndexImporter(NodeStore nodeStore, File indexDir, IndexEditorProvider ind
                 "checkpointed state [%s]", indexerInfo.checkpoint);
         this.indexDefinitionUpdater = new IndexDefinitionUpdater(new File(indexDir, INDEX_DEFINITIONS_JSON));
         this.asyncLaneToIndexMapping = mapIndexesToLanes(indexes);
+        this.indexPathsToUpdate = new HashSet<>();
+    }
+
+    enum IndexImportState {
+        NULL, SWITCHLANE, IMPORT_INDEX_DATA, BRING_INDEX_UPTODATE, RELEASE_CHECKPOINT

Review comment:
       Nit: SWITCH_LANE




-- 
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: dev-unsubscribe@jackrabbit.apache.org

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