How MVCC databases work internally

1. A very simple tree with 3 node exists somewhere on disk
2. The rightmost node has to be updated. So a copy is created.
3. Copy the root. The new root now points to the new leaf node as well. The earlier nodes exist in their position.
4. The left most node has to updated. So a copy is created.
5. New root copy is creates as well. Earlier versions exist.
1. Start with 2 root nodes. They are getting populated.
2. A new node appears.
3. A new leaf to root path has to be created.
4. More nodes are introduced.
5. The older root is picked and it now points to the new leaf. Meanwhile, the right side blue node is now unused
6. Another new node appears.
7. The older root is taken and is updated to point to all the recent B-Tree nodes.

--

--

--

Deep discussions on problem solving, distributed systems, computing concepts, real life systems designing. Developer @PayPal. https://in.linkedin.com/in/kousikn

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Music and Programming: the loop

How To Herd Cats: A Programmers Cheat Sheet On Coaching.

EC2 Exercise 1.2: Host a Static Webpage with Content from Github

Creating servers using cloud-init

Continuous Container Vulnerability Testing with Trivy

Infosys HackWithInfy 2022 For Engineering Graduates | Job Offer & Prizes | Apply Now

Substack Repost — 5 Developer/Programming Newsletters You Should Be Reading

Best Practices for writing ‘Dockerfile’ to reduce docker image size

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kousik Nath

Kousik Nath

Deep discussions on problem solving, distributed systems, computing concepts, real life systems designing. Developer @PayPal. https://in.linkedin.com/in/kousikn

More from Medium

Queue | The Data Structure which Schedules the Disk

Code Everyday | Leetcode Problem

6/29 leet code

The complete guide to the System Design Interview in 2022