Adding here some random things that I thought of while writing code (these should be organized in existing or new issues):
[X] Do not flush an empty memtable into an SSTable upon termination.
[ ] The list of active/immutable memtables is broken right now. First of all, it needs to become asynchronous (the KVStore should be able to serve requests while flushing them in the background) and the flushes should happen in chronological order (mutable memtable included).
[ ] Update the memtable size on key updates.
[ ] Improve the file format for WALs and SSTables. The values can be any kind of string. Currently, my code assumes that they do not contain newlines.
[ ] Can we combine async with RAII? For example, create async constructors/destructors? Alternatively, can we call async code from synchronous code (i.e., block until the async operation resolves)?
[ ] Proper exception handling.
[ ] Do we need any synchronization for the memtable and sstable lists?
Task
Implement a simple persistent key/value store using the seastar framework
Requirements