Skip to content

fix: bound InMemoryCache default size to prevent unbounded heap growth - #1902

Open
marceltft wants to merge 1 commit into
autonomousapps:mainfrom
appian:AP-70473-cache-fix-upstream
Open

marceltft wants to merge 1 commit into
autonomousapps:mainfrom
appian:AP-70473-cache-fix-upstream

Conversation

@marceltft

Copy link
Copy Markdown

The default cache value was previously -1 (unbounded), meaning every jar, Kotlin capability, and annotation processor analyzed during a build was retained for the lifetime of the build service. On large builds this is a significant and unbounded source of heap pressure. Default to a bounded size (300) instead.

Context

With a big mono repo with lots of projects, this is causing OOM.

Contributor Checklist

  • [ x ] I have read the Contributing guide.
  • [ x ] I have read the Code of Conduct.
  • [ x ] No part of this pull request was created with an LLM/AI.
  • [ x ] All contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
  • [ x ] Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by project maintainers.
  • [ x ] Provide functional tests (under src/functionalTest) to verify changes from a user perspective.
  • [ x ] Provide unit tests (under src/test) to verify logic.
  • [ x ] Ensure that unit tests pass: ./gradlew test.
  • [ x ] Ensure that functional tests pass: ./gradlew :functionalTest -DfuncTest.quick.

The default cache value was previously -1 (unbounded), meaning every jar, Kotlin capability, and annotation processor analyzed during a build was retained for the lifetime of the build service. On large builds this is a significant and unbounded source of heap pressure. Default to a bounded size (300) instead.
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.

1 participant