rishabhdaim commented on code in PR #2489:
URL: https://github.com/apache/jackrabbit-oak/pull/2489#discussion_r2318680461
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java:
##########
@@ -1477,6 +1478,24 @@ private void collectDeletedProperties(final NodeDocument
doc, final GCPhases pha
.map(p ->
p.stream().map(Utils::escapePropertyName).collect(toSet()))
.orElse(emptySet());
+ // OAK-11875
+ final Set<String> splitProps = doc.getSplitPropertyNames();
+ // Skip optimization if there are no split properties
+ if (!splitProps.isEmpty()) {
+ // Only calculate difference if we have split properties
+ Set<String> propsToBeDeleted =
SetUtils.difference(properties, retainPropSet);
+
+ // Check for intersection between sets directly
+ if (!Collections.disjoint(splitProps, propsToBeDeleted)) {
+ if (AUDIT_LOG.isInfoEnabled()) {
+ AUDIT_LOG.info("<Skipping> empty props deletion in
[{}] due to presence of deleted Split Properties.", doc.getId());
Review Comment:
added in
https://github.com/apache/jackrabbit-oak/pull/2489/commits/fb66913c6d82bcea7e93ed810e3f4707a189488d
--
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]