Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

Resolves #8353.

We should not create a scope child scope of a scope that we do not know statically is contained in the environment because we might add a scope that was added at a much higher level of the application and leak if we repeatedly add children to this scope.

@adamgfraser adamgfraser requested review from jdegoes and vigoo August 25, 2023 22:35
@narma
Copy link
Contributor

narma commented Aug 25, 2023

Why were the tests removed?

@adamgfraser
Copy link
Contributor Author

Because we can't add child scopes to a scope that we don't know statically exists.

@myazinn
Copy link
Contributor

myazinn commented Sep 5, 2023

Hi
Any updates on this fix?πŸ₯²

@adamgfraser
Copy link
Contributor Author

@myazinn You can see the updates for yourself here. πŸ˜ƒ

@ghostdogpr
Copy link
Member

Any chance to get this merged? I got hit by the memory leak in production, not using ZLayer as in the initial issue but using ZQuery#zipPar which is relying on ZIO#zipWithPar, in a fiber that never terminates. Thanks in advance πŸ˜„ πŸ™

@jdegoes jdegoes merged commit 0614b38 into zio:series/2.x Sep 15, 2023
@adamgfraser adamgfraser deleted the 8353 branch September 18, 2023 13:57
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.

ZIO 2.0.16 ZLayer#zipWithPar causes memory leak

5 participants