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

Fix memory leak in streamGetEdgeID #10753

Merged
merged 1 commit into from May 22, 2022

Conversation

Yuuoniy
Copy link
Contributor

@Yuuoniy Yuuoniy commented May 19, 2022

si is initialized by streamIteratorStart(), we should call streamIteratorStop() on it when done. #10752

si is initialized by streamIteratorStart(), we should call
streamIteratorStop() on it when done.
@enjoy-binbin enjoy-binbin added the state:to-be-merged label May 19, 2022
@oranagra oranagra linked an issue May 22, 2022 that may be closed by this pull request
@oranagra
Copy link
Contributor

@oranagra oranagra commented May 22, 2022

@Yuuoniy thank you.
p.s. the reason why this doesn't usually leak is that rax iterator has static buffers for short keys and shallow stacks.
for streams, the keys are always short, so the key would never leak any memory.
but the stack may leak on large streams.

this looks like a regression in redis 7.0 (#9127) that could in cause leaks in trimming (XADD, XTRIM), and also XDEL and AOFRW.

@itamarhaber @guybe7 correct me if i'm wrong.

@oranagra oranagra merged commit 4a7a4e4 into redis:unstable May 22, 2022
13 checks passed
@oranagra oranagra added the release-notes label May 22, 2022
@Yuuoniy
Copy link
Contributor Author

@Yuuoniy Yuuoniy commented May 22, 2022

@oranagra I see, thanks for your explanation. I found this one when went through the PR #10353 , and thought it will result in memory leak as well.

@oranagra oranagra mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes state:to-be-merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants