ankitaagar commented on code in PR #863:
URL: https://github.com/apache/jackrabbit-oak/pull/863#discussion_r1122671183


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java:
##########
@@ -157,6 +157,10 @@ public class MongoDocumentStore implements DocumentStore {
      */
     public static final long DEFAULT_THROTTLING_TIME_MS = 
Long.getLong("oak.mongo.throttlingTime", 20);
 
+    /**
+     * Document size of 16MB is a limit in Mongo
+     */
+    public static final long SIZE_LIMIT = 16793600;

Review Comment:
   > This is a bit larger than 16MB, what's the reason? I was also wondering 
whether we shouldn't warn below 16MB already to have some buffer, wdyt?
   
   Actually, Mongo compares with this size only and throws an exception. IMO, 
it would be good to give a WARN when the size reaches 15MB may be. wdyt?
   
   these are the exceptions, I think keeping 15MB as warning would be good
   > org.bson.BsonMaximumSizeExceededException: Payload document size is larger 
than maximum of 16777216.
   >org.bson.BsonMaximumSizeExceededException: Document size of 17826076 is 
larger than maximum of 16793600.
   16MB is 16777216



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