Database / RocksDB Basics Interview Questions
Describe the Write Path in RocksDB?
- An application calls Put, Delete, or Merge with a key and, if applicable, a value
- The write is appended to the Write-Ahead Log on disk, for durability
- The write is also applied to the active MemTable in memory
- Once the MemTable reaches its size limit, it's marked immutable, and a new MemTable takes over for future writes
- A background thread flushes the immutable MemTable to disk as a new Level-0 SSTable
- Background compaction later merges that SSTable with others as part of RocksDB's ongoing housekeeping
Because the application-facing part of this path, steps one through three, only touches memory and a sequential log, writes can complete quickly without waiting on the slower, more complex compaction process happening in the background.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
