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

Fix regression on LoggingFeature's max entity size #5007

Conversation

nunomsantos
Copy link
Contributor

Hi all,

PR #4531 implemented the performance improvement requested on #4522 but introduced a regression related to the max entity size property of LoggingFeature.
After it, logs from outbound streams are not appended with "...more..." when their entity is trimmed.

The reason is that we were stopping writes to a ByteArrayOutputStream too early, so we would never know if it was written in excess.
This looks like a sufficient fix, let me know if you can think of other edge cases.

Logs from outbound streams do not contain '...more...' on trimmed entities.
@jansupol jansupol requested a review from senivam March 18, 2022 10:17
Copy link
Contributor

@jansupol jansupol left a comment

Choose a reason for hiding this comment

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

LGTM, baos.write(ba, off, len) does all the checks for len and off

@senivam senivam merged commit 8a4ee71 into eclipse-ee4j:master Mar 18, 2022
@senivam senivam added this to the 2.36 milestone Mar 18, 2022
@nunomsantos nunomsantos deleted the fix-regression-on-loggingfeature-max-entity-size branch March 18, 2022 15:37
This was referenced Jun 14, 2022
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.

3 participants