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

RetriableReadableStream ineffective now that it handles "aborted" event #32268

Open
1 of 6 tasks
mheggeseth opened this issue Dec 17, 2024 · 1 comment
Open
1 of 6 tasks
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@mheggeseth
Copy link

  • Package Name: @azure/storage-blob
  • Package Version: 12.26.0
  • Operating system:
  • nodejs
    • version: v20.18.1
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

Describe the bug
The aborted event handling in sdk/storage/storage-blob/src/utils/RetriableReadableStream.ts added in #24141 renders the class ineffective for its purpose when the http response stream returned by the initial download call terminates because of a server timeout (specified in retryOptions.tryTimeoutInMs given to new BlobServiceClient) resulting in a connection reset and the http response emitting the aborted event which causes RetriableReadableStream to destroy itself, thereby not retrying the download from the byte offset at which it left off.

From Node's http.request docs:

In the case of a premature connection close after the response is received, the following events will be emitted in the following order:

  • 'socket'
  • 'response'
    • 'data' any number of times, on the res object
  • (connection closed here)
  • 'aborted' on the res object
  • 'close'
  • 'error' on the res object with an error with message 'Error: aborted' and code 'ECONNRESET'
  • 'close' on the res object

To Reproduce
Steps to reproduce the behavior:

  1. Create a new BlobServiceClient with retryOptions.tryTimeoutInMs=3000
  2. Call BlobClient.downloadToFile for a blob that would take longer than 3s to download
  3. The call to downloadToFile rejects because RetriableReadableStream destroys itself upon handling aborted rather than retrying

Expected behavior
Downloading the blob resumes from the byte offset at which the initial download left off after the per-request timeout.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Dec 17, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@github-actions github-actions bot added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

2 participants