-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
type/bugSomething isn't workingSomething isn't working
Description
Bug Report
During compaction, we copy all the data from the logs to be compacted to the new compacted log (code pointer).
After that, we update the lock-free index (code pointer). At this point, readers will start reading these values from the new compacted log as the lock-free index has been updated.
The issue is we are using a buffered writer, that we flush after all data has been copied (code pointer).
Issue
In between we update the index and we flush the buffered writer, all lock-free readers will try to get data from the compaction log, that is not flushed. Get operations will return key not found error.
Expected behaviour
Lock-free readers don´t return key not found if the key exists.
Shouldn´t we flush the buffered writer before updating the index?
Metadata
Metadata
Assignees
Labels
type/bugSomething isn't workingSomething isn't working