reschke commented on code in PR #2764:
URL: https://github.com/apache/jackrabbit-oak/pull/2764#discussion_r2848821095
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoDocumentStore.java:
##########
@@ -1651,7 +1651,32 @@ private <T extends Document> BulkRequestResult
sendBulkRequest(final Collection<
for (BulkWriteError err : e.getWriteErrors()) {
failedUpdates.add(bulkIds[err.getIndex()]);
}
+ } catch (BSONException bsonException) {
+ LOG.error("bulkUpdate of size {} failed with: {}",
updateOps.size(),
+ bsonException.getMessage(), bsonException);
+
+ // add diagnostics
+ String idOfbiggestUpdate = "";
+ int estimatedSizeOfBiggestUpdate = 0;
+
+ for (UpdateOp updateOp : updateOps) {
+ String id = updateOp.getId();
+ // this could be made more precise my measuring the BSON
serialization of
+ // conditions and updates
+ int estimatedSize = updateOp.toString().length();
+ LOG.debug("after bulk write: string serialization of changes
for id={} had an approximate size of {}",
+ id, estimatedSize);
+ if (estimatedSize > estimatedSizeOfBiggestUpdate) {
+ idOfbiggestUpdate = id;
+ estimatedSizeOfBiggestUpdate = estimatedSize;
+ }
+ }
+ LOG.error("bulkUpdate failure: biggest update was for i={} with
approximate size of {}",
Review Comment:
do you mean the two statement on ERROR level?
--
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]