Skip to content

Allow users to configure initial buffer size #37786

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

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Feb 7, 2025

Using the filelogreceiver with a system that does not allow for in-progress file reads (holds a lock on the file while writing) and we want to read the entire file (can think of a big proto binary) then decode and construct logs.

Because of this use-case and because of the files being ~5MB we do a lot of re-size of the scanner buffer until we are able to read the whole file/token.

Proposal is to allow customizing the initial buffer size for use-cases like this.

Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

I don't see any reason why initial buffer size should be fixed for header, or why header buffer size is applicable to the body of the file.

@bogdandrutu

This comment was marked as resolved.

@djaglowski

This comment was marked as resolved.

@bogdandrutu
Copy link
Member Author

@djaglowski PTAL

djaglowski

This comment was marked as resolved.

@bogdandrutu
Copy link
Member Author

@djaglowski thanks for the pointers. All updates are in place.

@bogdandrutu bogdandrutu merged commit 0a06b88 into open-telemetry:main Feb 10, 2025
162 checks passed
@github-actions github-actions bot added this to the next release milestone Feb 10, 2025
@bogdandrutu bogdandrutu deleted the add-initial-buffer branch February 10, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants