gnaresh19 commented on code in PR #684: URL: https://github.com/apache/jackrabbit-oak/pull/684#discussion_r963796623
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java: ########## @@ -383,16 +393,17 @@ private MongoDBConnection getOrCreateClusterNodesConnection(@NotNull MongoDocume return mc; } - private void ensureIndexes(@NotNull MongoStatus mongoStatus) { + private void ensureIndexes(MongoDatabase db, @NotNull MongoStatus mongoStatus) { // reading documents in the nodes collection and checking // existing indexes is performed against the MongoDB primary // this ensures the information is up-to-date and accurate boolean emptyNodesCollection = execute(session -> MongoUtils.isCollectionEmpty(nodes, session), Collection.NODES); - + createCollection(db, Collection.NODES.toString(), mongoStatus); Review Comment: This method performs: - if collection exists (empty or with data), skips creating new collection - else, creates collection per collection config -- 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