mbaedke commented on code in PR #1317:
URL: https://github.com/apache/jackrabbit-oak/pull/1317#discussion_r1504104485


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java:
##########
@@ -127,6 +127,7 @@ public class DocumentNodeStoreBuilder<T extends 
DocumentNodeStoreBuilder<T>> {
     private boolean isReadOnlyMode = false;
     private Feature prefetchFeature;
     private Feature docStoreThrottlingFeature;
+    private Feature docStoreCommitCleanupFeature;

Review Comment:
   Will do as I move the feature flag to DocumentNodeStore



##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java:
##########
@@ -571,4 +571,16 @@ default <T extends Document> List<T> findAndUpdate(final 
@NotNull Collection<T>
                                                        final @NotNull 
List<UpdateOp> updateOps) throws DocumentStoreException {
         return updateOps.stream().map(op -> findAndUpdate(collection, 
op)).collect(toList());
     }
+
+    /**
+     * If the feature "FT_COCLEANUP_OAK-10660" has been registered with the 
whiteboard (the DocumentNodeStoreService
+     * does this automatically), it may be enabled using a feature toggle. A 
DocumentStore implementation supporting
+     * that feature must overwrite thie method.
+     * For background information see 
https://issues.apache.org/jira/browse/OAK-10660
+     *
+     * @return true if the commit cleanup feature is enabled.
+     */
+    default boolean isCommitCleanupFeatureEnabled() {

Review Comment:
   That is legacy, so to say :)
   You are right, I'll move the flag.



##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java:
##########
@@ -813,7 +817,7 @@ && canUseModifiedTimeIdx(startValue)) {
             if (NodeDocument.DELETED_ONCE.equals(indexedProperty)) {
                 if (startValue != 1) {
                     throw new DocumentStoreException(
-                            "unsupported value for property " + 
+                            "unsupported value for property " +

Review Comment:
   Yep



##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java:
##########
@@ -571,4 +571,16 @@ default <T extends Document> List<T> findAndUpdate(final 
@NotNull Collection<T>
                                                        final @NotNull 
List<UpdateOp> updateOps) throws DocumentStoreException {
         return updateOps.stream().map(op -> findAndUpdate(collection, 
op)).collect(toList());
     }
+
+    /**
+     * If the feature "FT_COCLEANUP_OAK-10660" has been registered with the 
whiteboard (the DocumentNodeStoreService

Review Comment:
   It's also an internal interface, but I will remove the signature there 
anyway.



##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java:
##########
@@ -2111,6 +2115,11 @@ public <T extends Document> T getIfCached(Collection<T> 
collection, String key)
         return doc;
     }
 
+    @Override
+    public boolean isCommitCleanupFeatureEnabled() {
+        return docStoreCommitCleanupFeature != null && 
docStoreCommitCleanupFeature.isEnabled();

Review Comment:
   Yep



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

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

Reply via email to