This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch OAK-12103
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 26558102e310f273804538790d1403d6c1d0f1a6
Author: Julian Reschke <[email protected]>
AuthorDate: Fri Feb 20 16:16:34 2026 +0100

    OAK-12103: MongoDocumentStore: improve diagnostics for too large docs in 
reuest payloads
---
 .../oak/plugins/document/mongo/MongoDocumentStore.java           | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java
 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java
index fc6c0a8341..3b5c7b2c1b 100644
--- 
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java
+++ 
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java
@@ -1161,11 +1161,11 @@ public class MongoDocumentStore implements 
DocumentStore {
             return oldDoc;
         } catch (MongoWriteException e) {
             WriteError werr = e.getError();
-            LOG.error("Failed to update the document with Id={} with 
MongoWriteException message = '{}'. Document statistics: {}.",
+            LOG.error("Failed to update the document with id={} with 
MongoWriteException message = '{}'. Content statistics: {}.",
                     updateOp.getId(), werr.getMessage(), 
produceDiagnostics(collection, updateOp.getId()), e);
             throw handleException(e, collection, updateOp.getId());
         } catch (MongoCommandException e) {
-            LOG.error("Failed to update the document with Id={} with 
MongoCommandException message ='{}'. ",
+            LOG.error("Failed to update the document with id={} with 
MongoCommandException message = '{}'.",
                     updateOp.getId(), e.getMessage());
             throw handleException(e, collection, updateOp.getId());
         } catch (Exception e) {
@@ -1742,8 +1742,9 @@ public class MongoDocumentStore implements DocumentStore {
                 for (T doc : docs) {
                     LOG.error("Failed to create one of the documents " +
                                     "with BsonMaximumSizeExceededException 
message = '{}'. " +
-                                    "The document id={} has estimated size={} 
in VM.",
-                                    e.getMessage(), doc.getId(), 
doc.getMemory());
+                                    "The document id={} has estimated size={} 
in VM, Content statistics: {}.",
+                                    e.getMessage(), doc.getId(), 
doc.getMemory(),
+                                    Utils.mapEntryDiagnostics(doc.entrySet()));
                 }
                 return false;
             } catch (MongoException e) {

Reply via email to