Support for mongo bulkWrite & insertMany?

Hi,

I’ve been using both of the above for some batch work that I’ve offloaded to AWS Lambda in order to increase the speed to the DB. I noticed that these are not supported for Meteor’s latency avoidance mechanism (the part that simulates on the client and then execute on the server). Any thoughts on doing this? I could help do it but I don’t fully understand all the intricacies of how db operations are tracked and reconciled at the end of a ddp call.

Thanks,
Doron

You can await MyCollection.rawCollection().bulkWrite(ops, { ordered: false })

So that seems to work (I’m using fibers instead of await so its fits the rest of the pattern). Why does {ordered:false} matter as it appears to matter.

1 Like