rishabhdaim commented on code in PR #560:
URL: https://github.com/apache/jackrabbit-oak/pull/560#discussion_r880106211
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoUtils.java:
##########
@@ -190,4 +194,15 @@ static Type getDocumentStoreExceptionTypeFor(Throwable t) {
}
return type;
}
+
+ /**
+ * Util method to get node size limit for current mongo version
+ *
+ * @param version version of current mongo db
+ * @return size limit based on mongo db version
+ */
+ static int getNodeNameLimit(final String version) {
+ final ServerVersion sv = new
ServerVersion(Arrays.stream(version.split("\\.")).map(Integer::new).collect(Collectors.toList()));
+ return sv.compareTo(new ServerVersion(4,2)) >= 0 ? Integer.MAX_VALUE :
Utils.NODE_NAME_LIMIT;
Review Comment:
@mreutegg I have removed those tests because I added your proposed changes
to use `MongoStatus.isVersion` in the `MongoDocumentStore` class.
I made this change to further reduce the change set in order to make it
easier to backport (if required).
--
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]