You can find a document, update and return it using a single method: findAndModify. This is useful to deal with concurrency issues when multiple clients are trying to process documents from a collection and you don't want two of them processing the same one.

Read more

Object IDs in Mongo store several variables (screenshot from MongoChef), including the time it was created, a machine identifier, a process ID and an internal counter.

Screenshot showing an object ID and its parsed values

Read more
Subscribe to MongoDB