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

TypeBasedInputPayloadMetadata missing equals(…) and hashCode() #1729

Closed
odrotbohm opened this issue Dec 10, 2021 · 0 comments
Closed

TypeBasedInputPayloadMetadata missing equals(…) and hashCode() #1729

odrotbohm opened this issue Dec 10, 2021 · 0 comments
Assignees
Labels
in: core Core parts of the project type: bug
Milestone

Comments

@odrotbohm
Copy link
Member

No description provided.

@odrotbohm odrotbohm added type: bug in: core Core parts of the project labels Dec 10, 2021
@odrotbohm odrotbohm added this to the 1.5 M1 milestone Dec 10, 2021
@odrotbohm odrotbohm self-assigned this Dec 10, 2021
odrotbohm added a commit that referenced this issue Dec 10, 2021
odrotbohm added a commit that referenced this issue Dec 10, 2021
We now constrain the cache of controller proxy instances to 256 elements using Spring's ConcurrentLruCache to avoid instances created via DummyInvocationUtils.methodOn(Class<?>, Object…). The parameters are part of the cache key and used to expand the type-level mappings. If those vary for each call and a request creates a lot of links (>100000) the memory consumption grows significantly, first and foremost indefinitely.

Using the ThreadLocal will still make sure that the cache is local to a current request, so the proxies can actually be reused as the method invocations used to record the mappings would interfere for concurrent requests otherwise.

Removed obsolete generic parameter on the CacheKey type.
@odrotbohm odrotbohm changed the title TypeBasedInputPayloadMetadata missing equals(…)and hashCode() TypeBasedInputPayloadMetadata missing equals(…) and hashCode() Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Core parts of the project type: bug
Projects
None yet
Development

No branches or pull requests

1 participant