-
Notifications
You must be signed in to change notification settings - Fork 367
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 createReadStream when destroy() is called on resulting stream and validation is set to true #2010
Comments
Thank you for reporting this @jpambrun. I will investigate and update the issue accordingly. |
Hi @jpambrun. Thank you for the code above. I have attempted to reproduce this in my local environment utilizing calls to GCS as opposed to the emulator. I wanted to ask how much of a difference you are seeing in your environment with |
The area of interest is here: I did spent a bit several hours digging and could not really pinpoint the issue. It may be related to that pipe. Elsewhere the library uses pump whos main goal is to solve "When using standard source.pipe(dest) source will not be destroyed if dest emits close or an error." This GCS client is extremely complicated.. trying to go from the bare node http response to this returned All I can really say is that calling |
Hey @jpambrun, we've recently refactored our streams in a recent release (v6.4.1): In short, we've removed |
Hi @jpambrun , Please reopen with the requested information if you're still seeing this issue. |
Memory leak in createReadStream when destroy() is called on resulting stream and validation is set to true. This could occur when 1) the required data could be before the end of the file and reading to completion is not required, or 2) when a downstream client is disconnected or has navigated away.
Environment details
@google-cloud/storage
version: 6.2.3Steps to reproduce
validation: true
validation: false
docker compose setup
script
The text was updated successfully, but these errors were encountered: