reactivemongo.core.errors.GenericDriverException:
MongoError['size of document #19 exceed the maxBsonSize: 1295 > 1000']
database.collection[BSONCollection]("test_collection").insert(ordered = false)
.many(Seq(/* a few objects here, some of them larger than 1 kB */))
Please first share a reproducer (test use case) to check.
The new bulk support (including update) is still in dev.
I think this was not the case in 0.12.3; at least I only started seeing these exceptions after upgrading to 0.12.7-SNAPSHOT.
reactivemongo.api.collections.UpdateOps at line 105 you will find :
...
meta <- metadata
maxSz <- maxBsonSize
res <- {
val bulkProducer = BulkOps.bulks(
updates, meta.maxBulkSize, maxSz) { up =>
elementEnvelopeSize + pack.bsonSize(up.q) + pack.bsonSize(up.u)
...
updates, maxSz, meta.maxBulkSize) { up =>
...
val bulkProducer = BulkOps.bulks(
docs, bulkSz, maxSz) { pack.bsonSize(_) }
...
val bulkProducer = BulkOps.bulks(
docs, maxSz, bulkSz) { pack.bsonSize(_) }
That's what's is already fixed in the latest SNAPSHOT, so I suggest you check it's properly re-fetch rom Sonatype SNAPSHOTS.