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

[8.x](backport #41327) fix truncated event log message #41368

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 22, 2024

Fixes

Proposed commit message

Fix windows event log ingest issues caused by event message truncation.

  1. Increased scratch buffer size from 8K wide characters to 256K wide characters. The scratch buffer is used for efficiency, one buffer per event source. It was set really low.
  2. Handling insufficient scratch buffer size condition. Windows API documentation is not very clear about it but the APIs return ERROR_INSUFFICIENT_BUFFER only when used with nil buffer, otherwise they happily succeed copying as much as the given buffer allows (truncating message). In such case we will retry with an ad-hoc pool buffer of sufficient size. In real world the initial 256K characters buffer should be large enough, so this is really a what-if fallback.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs


This is an automatic backport of pull request #41327 done by [Mergify](https://mergify.com).

* fix truncated event log

* changelog

* fix warning

* fix golint

* playing hide an catch with CI

* size in bytes

* review

* code review

* add comment, unify code path

* refactor code

(cherry picked from commit 99d11eb)
@mergify mergify bot requested a review from a team as a code owner October 22, 2024 14:03
@mergify mergify bot added the backport label Oct 22, 2024
@mergify mergify bot assigned intxgo Oct 22, 2024
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 22, 2024
@botelastic
Copy link

botelastic bot commented Oct 22, 2024

This pull request doesn't have a Team:<team> label.

@intxgo intxgo merged commit 330535f into 8.x Oct 23, 2024
23 checks passed
@intxgo intxgo deleted the mergify/bp/8.x/pr-41327 branch October 23, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant