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

Memory leak in TypeGuardedDecoding in 4.x #834

Open
stswn opened this issue May 15, 2024 · 0 comments
Open

Memory leak in TypeGuardedDecoding in 4.x #834

stswn opened this issue May 15, 2024 · 0 comments

Comments

@stswn
Copy link

stswn commented May 15, 2024

TypeGuardedDecoding uses scala.reflect.api.Types.TypeApi#<:< and that causes memory leak in scala reflection Undolog as described here: scala/bug#8302

We have noticed memory leak in our application after consuming several millions of Avro messages. After analyzing heap dumps we have concluded that it is Undolog issue. We have found out that the only place that uses Undolog is in fact TypeGuardedDecoding. When we migrated derived decoder in favor of manually written one, memory issues disappeared.

I believe that in order to encounter this issue you must use either Either or shapeless coproduct in your model.

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

No branches or pull requests

1 participant