I'm trying to understand the internals of MongoDB BTree index, especially on the behaviour of node rebalancing and concurrency of the BTree during insertion and updates.
I did some digging on PostgreSQL and discover that it is based on Lehman and Yao's paper with some modification on it. Instead of locking the entire tree and rebalance the BTree, it holds a write-lock on the node it is splitting and the former right sibling so that it can update the left link of the former right sibling.
I wonder if there's anyone here who can share more details or point me in the right direction on MongoDB BTree algorithm.
Regards,
Wei Shan