Resumable uploads have confusing account for "last committed byte" #6880
Labels
api: storage
Issues related to the Cloud Storage API.
type: cleanup
An internal cleanup or hygiene concern.
In the REST-based resumable uploads we define the "last committed byte" as the value returned by the
Range
header of a successful chunk upload. This is the 1-based index of the highest-byte committed by the service. We use0
to represent "nothing committed yet". And it is trivial to make a "off by one error" when converting to C++ style ranges and 0-based indexing.In the GRPC-based resumable uploads the service returns the "committed_size", that is the number of bytes already written.
I think it would be cleaner to use this definition everywhere.
The text was updated successfully, but these errors were encountered: