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: allocate a new Buffer for each chunk of a Blob stream when using hana-client #846

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

BobdenOs
Copy link
Contributor

The original optimization was put into place to prevent allocating to much memory when streaming large data from HANA. This change relies on the memory management capabilities of nodejs to detect when a Buffer is no longer being referenced. Making this code identical in all scenarios where the optimization was working as intended, but will allow scenarios where the Buffer is kept for an extended period of time to not be changed with following reads.

fixes: #788

@BobdenOs BobdenOs merged commit ec75b50 into main Oct 16, 2024
3 checks passed
@BobdenOs BobdenOs deleted the issues/788 branch October 16, 2024 07:59
@cap-bots cap-bots mentioned this pull request Oct 16, 2024
johannes-vogel pushed a commit that referenced this pull request Oct 21, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>hana: 1.3.2</summary>

##
[1.3.2](hana-v1.3.1...hana-v1.3.2)
(2024-10-21)


### Fixed

* Adjust Decimal formatter to always render a whole number
([#853](#853))
([027d717](027d717))
* allocate a new Buffer for each chunk of a Blob stream when using
hana-client ([#846](#846))
([ec75b50](ec75b50))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

@cap-js/hana corrupts the large zip file ( zip files on read gives Corrupted zip or invalid signature)
2 participants