Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

fix: isolate Rest Stream from retry logic to avoid backpressure#1226

Merged
summer-ji-eng merged 3 commits intomainfrom
rest_stream_f
Apr 28, 2022
Merged

fix: isolate Rest Stream from retry logic to avoid backpressure#1226
summer-ji-eng merged 3 commits intomainfrom
rest_stream_f

Conversation

@summer-ji-eng
Copy link
Contributor

@summer-ji-eng summer-ji-eng commented Apr 19, 2022

Get rid of retry-request for rest server-stream.

retry-request cause problem:
gax returns the StreamProxy that a customer can read the data. This proxy stream sets RetryStream(A wrapper of StreamArrayPaser with retry logic) as ReadableStream. In the retry-request implementation, the stream listens on a response event where it is not the event that would be emitted by HTTP response.body or StreamArrayPaser. It somehow causes a miss forward data event when pipe to the next stream. That’s also the reason we need to forward data, end, error events in stream.ts before.

Reason to remove retry-request:

  1. retry-request is not supposed to be used with REST streams because there were no REST streams when retry-request was implemented a few years ago. And REST streams are a very rare use case.
  2. Long-term goal is to get rid of retry-request dependency.

@summer-ji-eng summer-ji-eng requested a review from a team as a code owner April 19, 2022 05:54
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Apr 19, 2022
@summer-ji-eng summer-ji-eng merged commit 485d5b2 into main Apr 28, 2022
@summer-ji-eng summer-ji-eng deleted the rest_stream_f branch April 28, 2022 21:55
gcf-merge-on-green bot pushed a commit that referenced this pull request May 3, 2022
🤖 I have created a release *beep* *boop*
---


### [2.30.3](v2.30.2...v2.30.3) (2022-05-03)


### Bug Fixes

* handle stream callback is undefined ([#1238](#1238)) ([269f805](269f805))
* isolate Rest Stream from retry logic to avoid backpressure ([#1226](#1226)) ([485d5b2](485d5b2))
* pin @grpc/proto-loader to v0.6.9 ([#1242](#1242)) ([bca9a91](bca9a91))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
summer-ji-eng added a commit that referenced this pull request May 6, 2022
summer-ji-eng added a commit that referenced this pull request May 9, 2022
summer-ji-eng added a commit that referenced this pull request May 9, 2022
miguelvelezsa pushed a commit to googleapis/google-cloud-node that referenced this pull request Jul 23, 2025
🤖 I have created a release *beep* *boop*
---


### [2.30.3](googleapis/gax-nodejs@v2.30.2...v2.30.3) (2022-05-03)


### Bug Fixes

* handle stream callback is undefined ([#1238](googleapis/gax-nodejs#1238)) ([269f805](googleapis/gax-nodejs@269f805))
* isolate Rest Stream from retry logic to avoid backpressure ([#1226](googleapis/gax-nodejs#1226)) ([485d5b2](googleapis/gax-nodejs@485d5b2))
* pin @grpc/proto-loader to v0.6.9 ([#1242](googleapis/gax-nodejs#1242)) ([bca9a91](googleapis/gax-nodejs@bca9a91))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
miguelvelezsa pushed a commit to googleapis/google-cloud-node-core that referenced this pull request Oct 22, 2025
🤖 I have created a release *beep* *boop*
---


### [2.30.3](googleapis/gax-nodejs@v2.30.2...v2.30.3) (2022-05-03)


### Bug Fixes

* handle stream callback is undefined ([#1238](googleapis/gax-nodejs#1238)) ([269f805](googleapis/gax-nodejs@269f805))
* isolate Rest Stream from retry logic to avoid backpressure ([#1226](googleapis/gax-nodejs#1226)) ([485d5b2](googleapis/gax-nodejs@485d5b2))
* pin @grpc/proto-loader to v0.6.9 ([#1242](googleapis/gax-nodejs#1242)) ([bca9a91](googleapis/gax-nodejs@bca9a91))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
GautamSharda pushed a commit to googleapis/google-cloud-node-core that referenced this pull request Oct 29, 2025
🤖 I have created a release *beep* *boop*
---


### [2.30.3](googleapis/gax-nodejs@v2.30.2...v2.30.3) (2022-05-03)


### Bug Fixes

* handle stream callback is undefined ([#1238](googleapis/gax-nodejs#1238)) ([269f805](googleapis/gax-nodejs@269f805))
* isolate Rest Stream from retry logic to avoid backpressure ([#1226](googleapis/gax-nodejs#1226)) ([485d5b2](googleapis/gax-nodejs@485d5b2))
* pin @grpc/proto-loader to v0.6.9 ([#1242](googleapis/gax-nodejs#1242)) ([bca9a91](googleapis/gax-nodejs@bca9a91))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
GautamSharda pushed a commit to googleapis/google-cloud-node-core that referenced this pull request Oct 29, 2025
🤖 I have created a release *beep* *boop*
---


### [2.30.3](googleapis/gax-nodejs@v2.30.2...v2.30.3) (2022-05-03)


### Bug Fixes

* handle stream callback is undefined ([#1238](googleapis/gax-nodejs#1238)) ([269f805](googleapis/gax-nodejs@269f805))
* isolate Rest Stream from retry logic to avoid backpressure ([#1226](googleapis/gax-nodejs#1226)) ([485d5b2](googleapis/gax-nodejs@485d5b2))
* pin @grpc/proto-loader to v0.6.9 ([#1242](googleapis/gax-nodejs#1242)) ([bca9a91](googleapis/gax-nodejs@bca9a91))

---
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants