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

LimitReader copies bytes instead of slicing so the underlying big array can be freed #11524

Merged
merged 5 commits into from
Apr 16, 2019

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Mar 29, 2019

In LimitReader when truncating the line if the configured limit was reached, the message was sliced. Slicing does not touch the underlying array. To make sure the long line can be truncated and freed, the reader copies the contents to a new array. Thus, freeing the data.

@kvch kvch added in progress Pull request is currently in progress. discuss Issue needs further discussion. review libbeat labels Mar 29, 2019
@kvch kvch requested a review from a team as a code owner March 29, 2019 09:54
@kvch kvch force-pushed the fix-filebeat-copy-instead-of-slicing branch from b40de8b to 6921dc2 Compare April 15, 2019 09:56
@kvch kvch removed discuss Issue needs further discussion. in progress Pull request is currently in progress. labels Apr 15, 2019
@kvch
Copy link
Contributor Author

kvch commented Apr 15, 2019

Fixed and added changelog.

@kvch
Copy link
Contributor Author

kvch commented Apr 16, 2019

Only reworded changelog entry, merging as before everything was green.

@kvch kvch merged commit 72bc454 into elastic:master Apr 16, 2019
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.

2 participants