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

Refactored OOM handler to use the new key-value store #804

Merged
merged 3 commits into from
Sep 16, 2020

Conversation

kstenerud
Copy link
Contributor

@kstenerud kstenerud commented Sep 15, 2020

The new low-level key-value store gives faster and more direct access for storing information critical to detecting OOM errors. This PR refactors BSGOutOfMemoryWatchdog to use the new K-V store, and also provides a nicer Objective-C interface to the store.

The K-V store is now the source of all truth for information used to detect OOM. Information incidentally written out to the sentinel file is secondary.

Note: The class is still a bit messy because it has more than one responsibility. Separating out concerns will be the subject of a later PR.

Fixes https://bugsnag.atlassian.net/browse/PLAT-5004

Refactored BSGOutOfMemoryWatchdog to use the new kwy-value store.
Removed unneeded public interfaces to BSGOutOfMemoryWatchdog, and renamed some properties and methods to better reflect the purpose of the class.
Added OOM logic tests.
@kstenerud kstenerud merged commit 931c763 into next Sep 16, 2020
@kstenerud kstenerud deleted the 5004-oom-kv-store branch September 16, 2020 14:16
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.

2 participants