You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2021/08/05 12:45:44 UTC

[GitHub] [jackrabbit-oak] stefan-egli commented on a change in pull request #299: OAK-9471 - Query for split documents by Revision GC times out

stefan-egli commented on a change in pull request #299:
URL: https://github.com/apache/jackrabbit-oak/pull/299#discussion_r683417839



##########
File path: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoVersionGCSupport.java
##########
@@ -127,6 +128,13 @@ protected SplitDocumentCleanUp createCleanUp(Set<SplitDocType> gcTypes,
         // With OAK-8351 this switched from 1 to 2 queries (see createQueries)
         // hence we iterate over the queries returned by createQueries
         List<Bson> queries = createQueries(gcTypes, sweepRevs, oldestRevTimeStamp);
+        BasicDBObject keys = null;
+        if(hasIndex(getNodeCollection(), SD_TYPE, SD_MAX_REV_TIME_IN_SECS)) {
+           keys = new BasicDBObject();
+           keys.put(SD_TYPE,1);
+           keys.put(SD_MAX_REV_TIME_IN_SECS, 1);
+        }
+

Review comment:
       Marking this as resolved as the hint is now created in the constructor




-- 
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-unsubscribe@jackrabbit.apache.org

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