rishabhdaim commented on code in PR #684:
URL: https://github.com/apache/jackrabbit-oak/pull/684#discussion_r965689623
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java:
##########
@@ -443,6 +454,19 @@ private void ensureIndexes(@NotNull MongoStatus
mongoStatus) {
createIndex(journal, JournalEntry.MODIFIED, true, false, false);
}
+ private void createCollection(MongoDatabase db, String collectionName,
MongoStatus mongoStatus) {
+ CreateCollectionOptions options = new CreateCollectionOptions();
+
+ if (mongoStatus.isVersion(4, 2)) {
+
options.storageEngineOptions(MongoDBConfig.getCollectionStorageOptions(mongoStorageOptions));
+ if (!db.listCollectionNames()
Review Comment:
```suggestion
if (!Iterables.tryFind(localDb.listCollectionNames(), s ->
Objects.equals(collectionName, s)).isPresent())
```
--
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]