Hacker News new | ask | show | jobs
by hinkley 572 days ago
In subversion writes replaced a node, then replaces the parent node all the way up to the root. So anyone doing a read in the middle of a merge only sees the old data because it saw the old root node. I assume MVCC systems do something similar, but for others I would think a lock per node allows for a lot less contention. And your project then relies very much on good indexes to avoid reading rows and thus parent nodes you don’t need.
1 comments

Most MVCC but also some filesystems (ZFS) and various thread safe functional data structures use similar pattern of instead of actually modifying a tree they make new nodes that refer to old and new nodes then finally replace the tree root pointer atomically.