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



##########
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:
       What do you think about moving this up to the constructor? That way, 
Revision GC will only check for the index once and now with every GC cycle.




-- 
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]


Reply via email to