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][cws][wkint-494] fix long, slow memory leak in CWS due to missed notifi… #25493

Merged
merged 2 commits into from May 14, 2024

Conversation

derekwbrown
Copy link
Contributor

…cations.

Change file and registry cache to (configurable size) LRU. Prevents missing messages from causing runaway memory leak.

While it won't prevent the messages from being lost, puts an upper bound on our memory consumption and prevents the leak.

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

There is some possibility that using an LRU cache, if not sized properly, will cause us to miss additional messages
because the filename was prematurely expired from the cache.

Describe how to test/QA your changes

Run it in the wkit load environment.

…cations.

Change file and registry cache to (configurable size) LRU.
Prevents missing messages from causing runaway memory leak.

While it won't prevent the messages from being lost, puts an
upper bound on our memory consumption  and prevents the leak.
@derekwbrown derekwbrown added this to the 7.54.0 milestone May 10, 2024
@derekwbrown derekwbrown added changelog/no-changelog qa/done Skip QA week as QA was done before merge and regressions are covered by tests labels May 10, 2024
@derekwbrown derekwbrown marked this pull request as ready for review May 10, 2024 02:07
@derekwbrown derekwbrown requested a review from a team as a code owner May 10, 2024 02:07
@derekwbrown derekwbrown changed the title [windows][cws] fix long, slow memory leak in CWS due to missed notifi… [windows][cws][wkint-494] fix long, slow memory leak in CWS due to missed notifi… May 10, 2024
@pr-commenter
Copy link

pr-commenter bot commented May 10, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=34200770 --os-family=ubuntu

@paulcacheux
Copy link
Contributor

/merge

@dd-devflow
Copy link

dd-devflow bot commented May 14, 2024

🚂 MergeQueue

Pull request added to the queue.

This build is going to start soon! (estimated merge in less than 23m)

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit 6237667 into 7.54.x May 14, 2024
207 of 208 checks passed
@dd-mergequeue dd-mergequeue bot deleted the db/7.54-cws-memleak branch May 14, 2024 08:34
derekwbrown added a commit that referenced this pull request May 16, 2024
…ssed notifi… (#25493)

* [windows][cws] fix long, slow memory leak in CWS due to missed notifications.

Change file and registry cache to (configurable size) LRU.
Prevents missing messages from causing runaway memory leak.

While it won't prevent the messages from being lost, puts an
upper bound on our memory consumption  and prevents the leak.

* fix incorrect key access; discovered in auto-tests
derekwbrown added a commit that referenced this pull request May 16, 2024
Backport using LRU cache to store file & registry path names.
Limits the amount of memory consumed when notifications are missed.

Also adds, in addition to original PR, stats to count when this occurs.

Original PR: #25493
dd-mergequeue bot pushed a commit that referenced this pull request May 16, 2024
* [windows][cws][wkint-494] fix long, slow memory leak in CWS due to missed notifi… (#25493)

* [windows][cws] fix long, slow memory leak in CWS due to missed notifications.

Change file and registry cache to (configurable size) LRU.
Prevents missing messages from causing runaway memory leak.

While it won't prevent the messages from being lost, puts an
upper bound on our memory consumption  and prevents the leak.

* fix incorrect key access; discovered in auto-tests

* [windows][cws][wkint-494] Backport LRU cache.

Backport using LRU cache to store file & registry path names.
Limits the amount of memory consumed when notifications are missed.

Also adds, in addition to original PR, stats to count when this occurs.

Original PR: #25493
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants