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

[Bug]: [Python SDK] Data Corruption on GCS read in 2.53.0 - 2.58.0 SDKs. #32169

Closed
1 of 17 tasks
shunping opened this issue Aug 13, 2024 · 0 comments · Fixed by #32135
Closed
1 of 17 tasks

[Bug]: [Python SDK] Data Corruption on GCS read in 2.53.0 - 2.58.0 SDKs. #32169

shunping opened this issue Aug 13, 2024 · 0 comments · Fixed by #32135

Comments

@shunping
Copy link
Contributor

shunping commented Aug 13, 2024

What happened?

We've discovered a data corruption problem impacting Python SDK versions 2.53.0 through 2.58.0.

Symptoms:
Beam pipelines utilizing these Python SDKs and reading data from Google Cloud Storage (GCS) via GcsIO, either directly or indirectly (e.g., through BigQueryIO), might experience data corruption. This issue can occur randomly, depending on network and GCS conditions.

Root cause:
In version 2.53.0, we switched the GcsIO implementation from apitools to the GCS Python client library google-cloud-storage (#29360). This library internally uses google-resumable-media for data downloads and uploads. The minimum google-cloud-storage version is set to 2.10.0, which relies on google-resumable-media version 2.3.2 or newer.

Unfortunately, a bug in google-resumable-media 2.3.0 is found to impact resumable downloads. When such a download starts from the middle of a GCS blob (non-zero start position), an incorrect start position is used in the HTTP call to GCS, leading to the wrong data chunk being returned.

The bug has been fixed since 2.7.2.

Mitigation:

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants