thomasmueller commented on code in PR #3198:
URL: https://github.com/apache/jackrabbit-oak/pull/3198#discussion_r4217562222


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/diff/DiffIndexMerger.java:
##########
@@ -242,8 +248,14 @@ boolean mergeDiff(JsonObject newImageLuceneDefinitions, 
JsonObject combined) {
 
         // collect the diff index(es)
         HashMap<String, JsonObject> toProcess = new HashMap<>();
-        tryExtractDiffIndex(combined, "/oak:index/" + DIFF_INDEX, toProcess);
-        tryExtractDiffIndex(combined, "/oak:index/" + DIFF_INDEX_OPTIMIZER, 
toProcess);
+        if (DiffIndex.isLegacyMode()) {
+            tryExtractDiffIndexLegacy(combined, "/oak:index/" + DIFF_INDEX, 
toProcess);
+            tryExtractDiffIndexLegacy(combined, "/oak:index/" + 
DIFF_INDEX_OPTIMIZER, toProcess);
+        } else if (tryExtractDiffIndex(combined, "/oak:index/" + DIFF_INDEX, 
toProcess) != null
+                || tryExtractDiffIndex(combined, "/oak:index/" + 
DIFF_INDEX_OPTIMIZER, toProcess) != null) {
+            // Abort on extraction errors to avoid treating missing entries as 
removed customizations.
+            return false;

Review Comment:
   Abort means nothing else happens (the warnings are stored, but indexes are 
unchanged).
   
   



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