Julian Reschke created OAK-12106:
------------------------------------
Summary: MongoDocumentStore - improve calculation of document sizes
Key: OAK-12106
URL: https://issues.apache.org/jira/browse/OAK-12106
Project: Jackrabbit Oak
Issue Type: Task
Components: documentmk
Reporter: Julian Reschke
For diagnostics after exceptions, we currently estimate the size in the VM.
However, there's an API in the Java driver what could be used:
Like:
{{ Document doc = new Document("text", "Hello ");}}
{{ BsonDocument bsonDoc = doc.toBsonDocument();}}
{{ int size = bsonDoc.getByteBuffer().remaining();}}
{{ System.out.println("BSON size: " + size + " bytes");}}
That would become more interesting should we try to back off with smaller batch
sizes (OAK-12104).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)