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

windows/perfmon fix for There is more data to return than will fit in the supplied buffer #20630

Merged
merged 12 commits into from
Aug 24, 2020

Conversation

narph
Copy link
Contributor

@narph narph commented Aug 17, 2020

What does this PR do?

In some cases the PdhExpandWildCardPathW api call will not retrieve the expanded buffer size initially so the next call will encounter the PDH_MORE_DATA error since the specified size on the input is still less than the required size.
If this is the case a fallback on the PdhExpandCounterPathW api is executed since it looks to act in a more stable manner. The PdhExpandCounterPathW api does come with some limitations but will satisfy most cases and return valid paths.

Why is it important?

Will fix There is more data to return than will fit in the supplied buffer errors.

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.

Related issues

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 17, 2020
@narph narph self-assigned this Aug 17, 2020
@narph narph added [zube]: In Review needs_backport PR is waiting to be backported to other branches. Team:Integrations Label for the Integrations team labels Aug 17, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 17, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 17, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20630 updated]

  • Start Time: 2020-08-24T09:29:31.285+0000

  • Duration: 65 min 31 sec

Test stats 🧪

Test Results
Failed 0
Passed 3130
Skipped 688
Total 3818

@narph narph merged commit 49e8024 into elastic:master Aug 24, 2020
narph added a commit to narph/beats that referenced this pull request Aug 27, 2020
…n the supplied buffer` (elastic#20630)

* mofidy doc

* fix

* changelog

(cherry picked from commit 49e8024)
narph added a commit to narph/beats that referenced this pull request Aug 27, 2020
…n the supplied buffer` (elastic#20630)

* mofidy doc

* fix

* changelog

(cherry picked from commit 49e8024)
narph added a commit that referenced this pull request Aug 31, 2020
…n the supplied buffer` (#20630) (#20819)

* mofidy doc

* fix

* changelog

(cherry picked from commit 49e8024)
narph added a commit that referenced this pull request Aug 31, 2020
…n the supplied buffer` (#20630) (#20818)

* mofidy doc

* fix

* changelog

(cherry picked from commit 49e8024)
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
…n the supplied buffer` (elastic#20630)

* mofidy doc

* fix

* changelog
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…n the supplied buffer` (elastic#20630) (elastic#20818)

* mofidy doc

* fix

* changelog

(cherry picked from commit 99cad76)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_backport PR is waiting to be backported to other branches. Team:Integrations Label for the Integrations team [zube]: In Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Windows][Perfmon] There is more data to return than will fit in the supplied buffer
3 participants