KEMBAR78
Incorrect start offset when range reads are interrupted · Issue #446 · googleapis/google-resumable-media-python · GitHub
Skip to content

Incorrect start offset when range reads are interrupted #446

@wilson1yan

Description

@wilson1yan

Environment details

GCP A100 machines
(unclear about exact software, as this bug was countered internally on Google infra when running on XManager Cloud)

Steps to reproduce

Given a range read of start to end bytes, if the read is interrupted, the code here will make another GET request at the wrong start offset, as it should be self.start + self._bytes_downloaded if self.start is not None. Currently, the downloader will return end + 1 bytes instead of end - start + 1 bytes after resuming from interruption even when start is specified.

The same issue also probably happens here in Downloader.

We encountered this issue when using the google python storage library in the setting where we had thousands of workers doing repeated range reads on the same GCS file. Code would run and return the wrong bytes somewhere 20-60min in. Adding in a fix (see pull request) seemed to resolve the issue.

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/google-resumable-media-python API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions