-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key positioning clarification #27
Comments
L0 - Memtable (latest version if key resides) |
On compactions older keys living in older levels are merged with new levels. Only the latest version will live on, if tombstoned, it is deleted. |
Should probably write this up on documentation somewhere and on website with some nice images! For sure :) I will do that when I get some time after work, most certainly. I appreciate the questions @delaneyj |
This phenomenon is called write amplification. When a key lives in multiple levels. Over time compactions try to rid this. |
I grok the write amplification, just wanted to see if once a key is written it's not going to percolate back up with retrievals. If you have iterators #26 it's less of a concern. |
Understood. Yeah I get it. Equality operations will be quicker because the bloom can identify if key sits in an sstable klog. Doesn't have to scan a bunch of times. in regards to iterator functions, yeah you could use a min and max key per sstable but then you'd have to store those somewhere and what if keys are large? So that's the thing with that, memory efficiency. There are other types of filters that allow searching ranges as well. Could be looked at. https://db.cs.cmu.edu/papers/2019/20_srf-zhang.pdf |
Added info on read me. |
Since it's not documentation, when a key is retrieved is it rewritten to the memtable (so oldest keys live in the lowest level)? Basically does it act as an lru or do key live at the level they were original written?
The text was updated successfully, but these errors were encountered: