Completely disable typeCache
in getTypeFromSchema
#2646
Closed
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.
Description
In 0f0be85, the usage
typeCache
was disabled ingetTypeFromSchema
due to schema corruption issues that have yet to be resolved.Despite being disabled
elem
is still hashed and populated into thetypeCache
resulting in a dramatic waste of memory and compute.This commit comments out all references of
typeCache
ingetTypeFromSchema
.Tests on v2.30.0 with a dramatically large CRD (~4.0Mb) show a ~50% decrease in memory consumption:
Acceptance tests
The cache itself appears to be write only, I'm happy to run the acceptance tests but there should be any functional changes.
Output from acceptance testing:
Release Note
Release note for CHANGELOG:
References
This was discovered by my team while digging into some crashes in our integration tests following an, admittedly massive, update of our redpanda CRD
Community Note