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(storage): modify the callback of mrd to return length of data read instead of limit. #11687

Merged
merged 7 commits into from
Mar 6, 2025

Conversation

shubham-diwakar
Copy link
Contributor

@shubham-diwakar shubham-diwakar commented Mar 5, 2025

Currently MRD takes a callback in each Add call.
Current call back returns the offset, length and error on that add call making the callback function look like, func(int64,int64,error) .
In some scenario data read can be different from limit set.
For example: We just have 50 bytes to read and ask for 100 bytes(length/limit) in this scenario we will return just 50 bytes.

Hence changed the callback to return amount of data read instead of data limit set.

Added the go doc for callback.

…of data length
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Mar 5, 2025
@shubham-diwakar shubham-diwakar marked this pull request as ready for review March 5, 2025 10:49
@shubham-diwakar shubham-diwakar requested a review from a team as a code owner March 5, 2025 10:49
@danielduhh danielduhh requested a review from BrennaEpp March 5, 2025 19:37
shubham-diwakar and others added 3 commits March 6, 2025 15:59
@tritone tritone requested a review from a team as a code owner March 6, 2025 21:55
@tritone tritone added the automerge Merge the pull request once unit tests and other checks pass. label Mar 6, 2025
@gcf-merge-on-green gcf-merge-on-green bot merged commit 9e359f0 into googleapis:main Mar 6, 2025
8 checks passed
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants