tl;dr: I have created a test suite for comparing the transaction isolation levels in different databases. I did this as background research for my book. This post explains why.
Using MongoDB to implement tree structures has some advantages, but as it lacks features that traditional RDBMSes have (like table locking and transactions), it is easy to create race conditions during simultanous operations. This is a pretty generic problem and I hope we can emphasize common problems and best practices on the implementation of thread-safe tree tables here.