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

[FEATURE REQ] Provide a way to retrieve the etag associated with the final flush request when using OpenWriteAsync #48192

Open
cool-mist opened this issue Feb 9, 2025 · 2 comments
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. feature-request This issue requires a new behavior in the product in order be resolved. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@cool-mist
Copy link

Library name

Azure.Storage.Files.DataLake 12.21.0

Please describe the feature.

When disposing the stream obtained from OpenWriteAsync, there isn't a way to get the etag of the final flush request today. This is useful when uploading large amounts of data, and caching the etag. We could send another request to get the Etag, but it is not guaranteed to be the same as the one we just uploaded.

We could write our own stream implementation to do this, however, the value add of using the one from OpenWriteAsync is that the sdk seems to call append in 4MB chunks which matches the smallest billing quanta, and so sdk's implementation is billing efficient.

@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 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 Feb 9, 2025
Copy link

github-actions bot commented Feb 9, 2025

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

@amnguye amnguye self-assigned this Feb 12, 2025
@amnguye
Copy link
Member

amnguye commented Feb 13, 2025

Alternatively, if you're open to it you could also use UploadAsync(.., DataLakeUploadOptions,..), with setting the DataLakeUploadOptions.TransferOptions = new() {MaximumTransferSize = 4MB} as well. If OpenWrite is not a necessity, since UploadAsync does return the ETag with PathInfo.

I do agree that the alternative of having to do the stream implementation, is not ideal. However, you can manually ensure that each Append call is done in 4MB chunks.

As for the ask to return the ETag of the Flush of the Stream, may require some kind of API change, due to the fact that the return value is currently a Stream, and the Flush method is overridden from the Stream class. It wouldn't be as straightforward as returning the ETag unfortunately.

We can leave this github issue open to see if there's any traction from other different customers asking for this feature request.

@amnguye amnguye added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 13, 2025
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. feature-request This issue requires a new behavior in the product in order be resolved. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team 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