Add findAndModify() function to the SDK. This will provide atomic find+update and also return the updated document. The existing updateOne() does not return the updated document. You may do findOne() after the update that may cause data integrity problems in a multithreaded system where the same document is being updated by separate threads/sessions.