rishabhdaim commented on code in PR #1317: URL: https://github.com/apache/jackrabbit-oak/pull/1317#discussion_r1504048284
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentNodeStoreBuilder.java: ########## @@ -318,6 +319,16 @@ public Feature getDocStoreThrottlingFeature() { return docStoreThrottlingFeature; } + public T setDocStoreCommitCleanupFeature(@Nullable Feature docStoreCommitCleanup) { Review Comment: ```suggestion public T setDocStoreChildOrderCleanupFeature(@Nullable Feature docStoreChildOrderCleanup) { ``` ########## 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: ```suggestion default boolean isChildOrderCleanupEnabled() { ``` ########## 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: I would avoid mentioning the feature in Javadocs cause this is an internal implementation. ########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/TimingDocumentStoreWrapper.java: ########## @@ -629,4 +629,9 @@ private void updateAndLogTimes(String operation, long start, int paramSize, int } } + + @Override + public boolean isCommitCleanupFeatureEnabled() { + return base.isCommitCleanupFeatureEnabled(); Review Comment: We need to log timing for this. ########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/LoggingDocumentStoreWrapper.java: ########## @@ -478,4 +478,9 @@ private void log(String message) { } LOG.info(out); } + + @Override + public boolean isCommitCleanupFeatureEnabled() { + return store.isCommitCleanupFeatureEnabled(); Review Comment: Please add logging this method ########## 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: please remove this unnecessary change. ########## 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: ```suggestion private Feature docStoreChildOrderCleanupFeature; ``` -- 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