3 ms·
If you don't need your snapshot read-only queries to be linearizable, then you don't need MVCC for this: just take a consistent checkpoint every second or minut
by senderista 2y ago
If you don't need your snapshot read-only queries to be linearizable, then you don't need MVCC for this: just take a consistent checkpoint every second or minute or hour. A simple way to implement low-frequency snapshots is what Redis made famous: fork the server process so all future updates in the parent are to CoW pages and read the snapshot from the child. (HyPer did this originally but I'm not sure they still do.)
I think this approach makes more sense than MVCC when linearizable abort-free read-only transactions aren't really necessary: you can avoid a lot of complexity and a lot of overhead by not retaining old versions.
- unnah 2y agoBut those Redis snapshots are only used for regular back-ups, so completely unlike snapshot isolation in a relational database, right?
- senderista 2y agoI was referring to using recent database snapshots for read-only queries. HyPer used the same snapshotting technique as Redis backups for this purpose: https://cs.brown.edu/courses/cs227/archives/2012/papers/olap/hyper.pdf https://cs.brown.edu/courses/cs227/archives/2012/papers/olap...
- unnah 2y agoOk, thanks. I was wondering because last year I spent a few hours poring through Redis documentation, trying to figure out how to get access to read-only snapshots...