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

Make sure the filter gets updated with the last timestamp on each #2796

Merged
merged 1 commit into from Sep 6, 2016

Conversation

derekwbrown
Copy link
Contributor

What does this PR do?

PR fixes a customer problem whereby the CPU consumed by the Win32 event log check would increase linearly with time.

Motivation

Customer request

Testing Guidelines

An overview on testing
is available in our contribution guidelines.

Additional Notes

Reset WMI query filters before each run. Otherwise, all checks are done relative to when the agent was started, resulting in an ever-growing list of events to be parsed.

The WMI filter was attached to the (cached) sampler object. So, even though the filter was recomputed each time with a new "TimeGenerated >= " string, that was never actually used by the WMI query. So, each successive query returned any new entries, PLUS any entries that had already been retrieved. Processing the list then had a linearly increasing time (and space). Compounding it is the check to make sure the duplicate entries aren't reported, which then caused the (ever growing) list to be parsed again.

run.  Otherwise, all checks are done relative to when the agent was started,
resulting in an ever-growing list of events to be parsed
@remh remh added this to the 5.9.0 milestone Aug 30, 2016
@truthbk
Copy link
Member

truthbk commented Sep 6, 2016

Looks good to me. Let's make sure we test this well on the release candidate. 👍

@truthbk
Copy link
Member

truthbk commented Sep 6, 2016

CI failure is unrelated, on flaky test.

@truthbk truthbk merged commit 98edbb1 into master Sep 6, 2016
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.

None yet

3 participants