Using Mongo 2.4.9 with C# driver 1.8.3
With the following example:
WriteConcern concern = WriteConcern.Unacknowledged;
for(int i=0;i<100;i++){
if(i==99)concern=WriteConcern.Acknowledged;
collection.Update(Query.EQ("i",i),Update.Set("i2",i),concern);
}
// Can I assume that all writes in this loop have now been 'committed'?
My aim is that I perform the first 99 updates as quickly as possible, without acknowledgement, and then on the last once, ask for acknowledgement, so I know that all 100 updates occurred
Does the code above make sense, or work? If not, is there a better way to achieve this?
Failing that, should I wait for the release of MongoDB 2.6 and the bulk apis?
Thanks, Ben