Database / RocksDB Basics Interview Questions
What is a Snapshot in RocksDB?
A Snapshot is a consistent, read-only view of the database's state at a specific point in time, unaffected by writes that happen after it was taken.
- Lets a read operation see the database exactly as it looked at snapshot creation, even while other writes continue concurrently
- Doesn't physically copy any data, it's implemented efficiently using RocksDB's existing versioned, immutable SSTable structure
- Commonly used for things like consistent backups or long-running reads that shouldn't be affected by concurrent writes
Because SSTables are already immutable, RocksDB can offer this kind of point-in-time view relatively cheaply, without needing to duplicate the underlying data.
More Related questions...