How does Meteor's optimistic UI handle server rejections and errors on dependent operations?
If I do :
var item1Id = Items.insert({list: groceriesId, name: "Watercress"}); // op1
var item = Items.findOne({_id: item1Id});
Items.update(item, {$set: {name: "Peppers"}}); // op2
Items.insert({list: groceriesId, name: "Cheese"}); // op3
If op1
fails on the server-side but succeeds on the client-side, what will happen to op2
and op3
?
Will they both be rolled back?