Log read write impl - #33
Conversation
agavra
left a comment
There was a problem hiding this comment.
This is deliciously simple 😋 I guess we can start testing some read/write throughput numbers as soon as this is in! Biggest next thing is probably improving the compaction since STCS makes no sense for a log. We could probably start with just FIFO compaction. Could be a good first issue for us to reserve for external contributors.
| /// Returns an error if there is a storage failure while reading entries. | ||
| pub async fn next(&mut self) -> Result<Option<LogEntry>> { | ||
| todo!() | ||
| // Lazily initialize the storage iterator on first call |
There was a problem hiding this comment.
curious why not rename new -> async open and just load it there? (no preference, just curiosity)
There was a problem hiding this comment.
Sounds good to me.
| let mut batch = WriteBatch::new(); | ||
| for record in records { | ||
| batch.put(record.key, record.value); | ||
| } |
There was a problem hiding this comment.
fwiw, this is another reason why we couldn't use the sequence number from slate. a single AtomicWrite gets only a single seqnum but we need each individual record here to have a distinct monotonically increasing one
This patch has implementations for the append/scan apis exposed by
Log.