In Meteor, how do you Insert/Upsert to a Meteor Collection with Unacknowldeged Write Concern w=0
?
Can the write concern be set during the insert/upsert, rather than as a environment variable?
Yes, you can pass writeConcern as of Mongo v2.6:
http://docs.mongodb.org/manual/reference/command/insert/#dbcmd.insert
No, you can't pass that option in Meteor. It's not documented here:
http://docs.meteor.com/#update
I did some digging to see what you'd have to do if you wanted to patch Meteor. Here is the link to their update/insert/upsert code:
https://github.com/meteor/meteor/blob/devel/packages/mongo/collection.js
It looks like it delegates to DDP which is their Distributed Data Persistence framework. Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With