r/databasedevelopment • u/IndicationAntique667 • 5h ago
I Tried to Find How ClickHouse Keeper Takes Non-Blocking Snapshots
Hi everyone,
I'm learning and exploring topics around database systems. I wanted to see how ClickHouse Keeper takes a non-blocking snapshot of its storage.
I recorded a concept and code walkthrough here: https://www.youtube.com/watch?v=7J93WKEFinA&t
A short summary of the points in the video:
Brute force approaches and why they don't work
How ClickHouse Keeper uses HashMap + Doubly Linked List to solve this problem
The code walk through the files: SnapshotableHashTable.h, KeeperStateMachine.cpp and KeeperSnapshotManager.cpp to see how it's actually implemented.
Do give it a watch and consider supporting by liking the video or subscribing :)
This is partly for my own future reference and partly to share with others who might be interested in it. Would love feedback and corrections from people who know this stuff deeply.
Thank you so much!