RLock or WLock when we do a put/deletion?
El-even-11 opened this issue · 3 comments
El-even-11 commented
In docs, it says that we should take a write lock when we do a put/deletion:
But in reference solution, we take a read lock actually:
It seems that RLock is enough, because MemTable is concurrent safe?
skyzh commented
You are correct. The lock is actually used to protect lost of memtables instead of the memtable itself.
skyzh commented
Lost -> list
skyzh commented
Will be fixed shortly…