Target
- Read the refercens:
- essay
- paper
- Understand what is bitcask and why it is better than LSM?
Notes
Storage Structure
- One active data file with mulitple imutable data file.
- KeyDir in-memory mapping: key -> position of value.
- hint file: a meta file including all the keys in its corresponding data file and help recover the KeyDir when crashing.
Strengths
- Low latency for read and write operations
- High Write Throughput
- Single disk seek to retrieve any value
- Predictable lookup and insert performance
- Crash recovery is fast and bounded
- Backing up is easy - Just copy the directory would suffice
Weakness
- The requirement of massive memory to store the KeyDir.
Questions
why is crash recovery is fast?