Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chunk iterator API to osiris_log #151

Merged
merged 2 commits into from
Oct 25, 2023
Merged

Add chunk iterator API to osiris_log #151

merged 2 commits into from
Oct 25, 2023

Conversation

kjnilsson
Copy link
Contributor

To allow readers to read chunks incrementally rather than in one go.

osiris_log:read_chunk_parsed/2 has been updated to use the chunk iterator API as well but with a full chunk read ahead configuration.

osiris_log:chunk_iterator/2 tries to estimate a read ahead amount based on the "credit hint" that can be passed to indicate how many entries are likely to be read in one go.

@ansd ansd self-requested a review October 23, 2023 14:27
src/osiris_log.erl Outdated Show resolved Hide resolved
Copy link
Member

@ansd ansd left a comment

Choose a reason for hiding this comment

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

I tested the chunk iterator on the rabbitmq-server native-amqp branch. Tests ran green, so it works fine.

To allow readers to read chunks incrementally rather than in one go.

osiris_log:read_chunk_parsed/2 has been updated to use the chunk
iterator API as well but with a full chunk read ahead configuration.

osiris_log:chunk_iterator/2 tries to estimate a read ahead amount based
on the "credit hint" that can be passed to indicate how many entries
are likely to be read in one go.
For parsing uncompressed batch entries.
@michaelklishin michaelklishin merged commit 48d210b into main Oct 25, 2023
6 checks passed
@michaelklishin michaelklishin deleted the chunk-iterator branch October 25, 2023 11:04
@michaelklishin michaelklishin added this to the 1.7.0 milestone Oct 30, 2023
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.

4 participants