Uh oh!
There was an error while loading. Please reload this page.
stream: fix memory usage regression in writable - #53188
Conversation
nodejs-github-bot
commented
May 28, 2024
Review requested:
|
orgads
commented
May 28, 2024
orgads
commented
May 28, 2024
Actually the condition is equivalent. I'll need to dig deeper. |
Uh oh!
There was an error while loading. Please reload this page.
orgads
commented
May 28, 2024
orgads
commented
May 29, 2024
Ok, I found the culprit. Ready for review. Can you suggest how to add a test? |
benjamingr
commented
May 29, 2024
Good question, I'm honestly not so sure - you can test writecb is set to null in onwrite but I'm not sure that tests something useful. We don't have memory benchmarks I'm aware of though that might be a good idea overall. |
mcollina
left a comment
There was a problem hiding this comment.
lgtm
However this is not a memory leak, because the memory consumption is stable.
I would recommend we change the commit/PR title to "stream: fix memory usage regression in writable".
mcollina
commented
May 29, 2024
A test for this would be nice but I'm at a loss on how to write it. |
nodejs-github-bot
commented
May 29, 2024
orgads
commented
May 29, 2024
Done. |
nodejs-github-bot
commented
May 29, 2024
Setting writecb and afterWriteTickInfo to null did not clear the value in the state object. Amends 35ec931 (stream: writable state bitmap). Fixesnodejs#52228.
nodejs-github-bot
commented
May 30, 2024
orgads
commented
May 30, 2024
smartos build fails, unrelated to my changes. |
nodejs-github-bot
commented
May 31, 2024
nodejs-github-bot
commented
May 31, 2024
nodejs-github-bot
commented
Jun 1, 2024
nodejs-github-bot
commented
Jun 1, 2024
nodejs-github-bot
commented
Jun 2, 2024
Landed in 78a326e |
orgads
commented
Jun 2, 2024
Thanks! What's the process of backporting? Should I cherry pick and create a new PR for 22 and 20? |
H4ad
commented
Jun 2, 2024
@orgads Since we didn't put labels like "do not land", this PR is automatically eligible to be included in older versions, just wait for the next version, the releasers will include this PR. You only need to create backport when releasers find a conflict that doesn't allow them merge it easily. /cc @nodejs/releasers Just to let you know guys an important fix for memory usage on streams was merged. |
Setting writecb and afterWriteTickInfo to null did not clear the value in the state object. Amends 35ec931 (stream: writable state bitmap). Fixes#52228. PR-URL: #53188 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Setting writecb and afterWriteTickInfo to null did not clear the value in the state object. Amends 35ec931 (stream: writable state bitmap). Fixesnodejs#52228. PR-URL: nodejs#53188 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
orgads
commented
Jun 21, 2024
@H4ad@marco-ippolito It hasn't been backported to 20.x. :( |
marco-ippolito
commented
Jun 21, 2024
It has not been on the Current enough (2 weeks) to be backported to v20 |
orgads
commented
Jun 21, 2024
I see. Thanks for the explanation. |
Setting writecb and afterWriteTickInfo to null did not clear the value in the state object. Amends 35ec931 (stream: writable state bitmap). Fixes#52228. PR-URL: #53188 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Setting writecb and afterWriteTickInfo to null did not clear the value in the state object.
Amends 35ec931 (stream: writable state bitmap).
Fixes#52228.