Skip to content

Conversation

@kim
Copy link
Contributor

@kim kim commented Mar 24, 2025

Moves support for streaming (network) transfer of raw commitlog data to the
commitlog crate proper, along with some improvements.

Also adds free-standing functions to determine the commitlog metadata and for
truncation. This allows to bypass opening the commitlog in some cases, which
can be both convenient and avoids implicit creation of a segment when the
commitlog is empty.

API and ABI breaking changes

None

Expected complexity level and risk

2

Complexity is in diffing against the previous implementation, which lives in a
different repo. Risk is zero, as the code is not used in a released version.

Testing

Adds tests.

kim added 2 commits March 24, 2025 12:12
This allows to bypass `Commitlog::open` calls. `open` creates the
initial segment if it doesn't exist, which can be undesirable.
Provide a `reset_to` free standing function, for when the `open`
overhead is not needed.
@kim kim requested a review from Shubham8287 March 24, 2025 11:28
@kim kim force-pushed the kim/commitlog/streaming branch from b4d1dba to e7cfeaa Compare March 24, 2025 11:29
@bfops bfops added the release-any To be landed in any release window label Mar 24, 2025
@Shubham8287
Copy link
Contributor

Much needed consolidation!

@coolreader18 coolreader18 mentioned this pull request Mar 25, 2025
2 tasks
kim added 2 commits March 26, 2025 08:18
Adds machinery for reading and writing raw commitlog data in an (async)
streaming fashion.

Improves on the existing implementation by minimizing fsync calls,
simplifying the API, and avoiding `tokio::task::block_in_place` calls.
The latter is likely to improve throughput on densely provisioned
servers.
@kim kim force-pushed the kim/commitlog/streaming branch from caf9085 to 57693a7 Compare March 26, 2025 07:18
@kim kim enabled auto-merge March 26, 2025 07:18
@kim kim added this pull request to the merge queue Mar 26, 2025
Merged via the queue into master with commit 5063bd8 Mar 26, 2025
13 of 14 checks passed
@kim kim deleted the kim/commitlog/streaming branch March 26, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-any To be landed in any release window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants