LSM-Tree
LSM-Tree copied to clipboard
Anticipated inconsistency while flushing memtable to disk
In the function flush_memtable_to_disk, I believe that the log needs to be added first before adding key value node to the bloom filter and index.
- If there is a failure and the bloom filter doesn't work but the key-value node gets added to the index it might lead to ignoring a key that is present.
- This is because the bloom filter may return false, indicating that the key is not present.