bhabegger commented on code in PR #3068:
URL: https://github.com/apache/jackrabbit-oak/pull/3068#discussion_r3734578770
##########
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/diff/DiffIndexMerger.java:
##########
@@ -278,6 +336,15 @@ private static void
extractExistingMergedIndexes(JsonObject indexDefs, HashMap<S
if (key.indexOf("-custom-") < 0 ||
!value.getProperties().containsKey("mergeInfo")) {
continue;
}
+ String type = JsonNodeUpdater.oakStringValue(value, "type");
+ if (type != null && "disabled".equals(type)) {
+ // ignore disabled indexes:
+ // only if the version that is in use contains the "mergeInfo"
property,
+ // then simplified index management is currently used
+ // (otherwise we create a new merged info even for
environments that no longer use it,
+ // if there are indexes that are not yet deleted)
+ continue;
Review Comment:
The comment is a bit opaque to me.
- mergeInfo presence on a an index contains -custom- in it's name indicates
a version comming from diff.json in a previous deploy.
- here we are in the presence of an index definition that was previously
stored as disabled
So if I understand correctly here, we "pretend" it didn't exist in the
previous merge... ?
--
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]