nit0906 commented on code in PR #847:
URL: https://github.com/apache/jackrabbit-oak/pull/847#discussion_r1100921223


##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/indexversion/IndexVersionOperation.java:
##########
@@ -90,25 +93,28 @@ public static List<IndexVersionOperation> 
generateIndexVersionOperationList(Node
      * @return This method returns an IndexVersionOperation list i.e 
indexNameObjectList marked with operations
      */
     public static List<IndexVersionOperation> 
generateIndexVersionOperationList(NodeState rootNode, String parentPath,
-            List<IndexName> indexNameObjectList, long purgeThresholdMillis, 
boolean shouldPurgeBaseIndex) {
+            List<IndexName> indexNameObjectList, long purgeThresholdMillis, 
boolean shouldPurgeBaseIndex, boolean ignoreIsIndexActiveCheck) {
         NodeState indexDefParentNode = NodeStateUtils.getNode(rootNode, 
parentPath);
         List<IndexName> reverseSortedIndexNameList = 
getReverseSortedIndexNameList(indexNameObjectList);
         List<IndexVersionOperation> indexVersionOperationList = new 
LinkedList<>();
 
         List<IndexName> disableIndexNameObjectList = 
removeDisabledCustomIndexesFromList(indexDefParentNode, 
reverseSortedIndexNameList);
         // for disabled indexes, we check if they exist in read-only repo, it 
not anymore, do full deletion then, otherwise, no action needed
+        // Also skip deletion if ignoreIsIndexActiveCheck is true (which would 
be from ElasticPurgeOldIndexVersion) - this would be for ES indexes where we 
don't have any way to determine if the disabled ES index is
+        // So we skip deleting the disabled index here so that we don't delete 
a disabled base index by mistake.
+        // Summary - Delete disabled index if ignoreIsIndexActiveCheck = false 
(which would be when called from LucenePurgeOldIndexVersion) and hidden oak 
mount doesn't exists.

Review Comment:
   I think exists is correct since oak mount is singular and third person.



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