shodaaan commented on code in PR #2489:
URL: https://github.com/apache/jackrabbit-oak/pull/2489#discussion_r2318205189


##########
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:
   Suggestion: include the intersection between splitProps and propsToBeDeleted 
(the actual properties which prevent deletion) in this log message. It also may 
be useful to include the propsToBeDeleted as well in the log message



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

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

Reply via email to