feat(main): Support Go AutoMemLimit #7080
Open
+1,202
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does:
Hi,
This PR implements the
automemlimitfeature requested in issue #7064.I've followed the Prometheus implementation as a reference, adding the simple
SetGoMemLimitWithOptscall at the start ofcmd/cortex/main.goand using the project's logger. I did not add the complex flag/config logic which was mentioned in the reference PR.Note on Tests:
I ran
make testlocally. The build succeeded and the tests forcmd/cortexpassed. However, the test run failed inpkg/alertmanagerandpkg/compactor. These appear to be unrelated, so I'm relying on the CI to run the full suite.Which issue(s) this PR fixes:
Fixes #7064
Checklist
CHANGELOG.mdupdated - I'm not sure if a changelog entry is needed for this. Please let me know if I should add one