Skip to content

Log read write impl - #33

Merged
hachikuji merged 6 commits into
mainfrom
log-read-write-impl
Jan 8, 2026
Merged

Log read write impl#33
hachikuji merged 6 commits into
mainfrom
log-read-write-impl

Conversation

@hachikuji

Copy link
Copy Markdown
Contributor

This patch has implementations for the append/scan apis exposed by Log.

@agavra agavra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread log/src/log.rs Outdated
/// 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why not rename new -> async open and just load it there? (no preference, just curiosity)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me.

Comment on lines 187 to 190
let mut batch = WriteBatch::new();
for record in records {
batch.put(record.key, record.value);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hachikuji
hachikuji merged commit 7f7c909 into main Jan 8, 2026
1 check passed
@hachikuji
hachikuji deleted the log-read-write-impl branch January 8, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants