Rollback of update operation

1,256 views
Skip to first unread message

revit

unread,
Sep 13, 2016, 10:09:37 AM9/13/16
to mongodb-dev
Looking at the code it seems that if update operation occurred no commit or rollback will be necessary by mongoDB (as opposed to in insert operation where writeUnitofwork is responsible for persisting the data). Am I missing something? Does the storage engine is responsible of the rollback of the update operation? and why is the difference (storage engine vs. mongoDB responsibility of the rollback)? Thanks.

Scott Hernandez

unread,
Sep 13, 2016, 10:19:09 AM9/13/16
to Mongodb Dev Mongodb
I'm not sure what code you are looking at but here is the
WriteUnitOfWork for an updated document:
https://github.com/mongodb/mongo/blob/master/src/mongo/db/exec/update.cpp#L573

All of this is handled above the storage engine. The storage engine
implements the RecoveryUnit used to make this work, of course.
> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mongodb-dev...@googlegroups.com.
> To post to this group, send email to mongo...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mongodb-dev.
> For more options, visit https://groups.google.com/d/optout.

revit

unread,
Sep 14, 2016, 7:50:46 AM9/14/16
to mongodb-dev
Thanks!! Apparently I've missed that...
Reply all
Reply to author
Forward
0 new messages