Skip to content

[Java] Preserve BigQuery failed rows across retries - #39999

Draft
bvolpato wants to merge 5 commits into
apache:masterfrom
bvolpato:bvolpato/java-bigquery-failed-row-retries
Draft

bvolpato wants to merge 5 commits into
apache:masterfrom
bvolpato:bvolpato/java-bigquery-failed-row-retries

Conversation

@bvolpato

@bvolpato bvolpato commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

BigQuery Storage Write API writers remove rejected payloads and timestamps before retrying a batch, but leave failsafe rows in their original positions. When withFormatRecordOnFailureFunction is set, a later serialization error can select the wrong original row for the failure output, duplicating one record and omitting another.

This change filters failsafe rows alongside payloads and timestamps in both writers. Nullable entries used for protobuf-to-TableRow fallback are preserved. The API defines row-error indexes relative to the current request.

Local regression validation passed with controlled append responses. A recorded live BigQuery run also reproduced the misattribution after a partial row-error response. That response size was observed in the run and is not an API guarantee.

Run the GCP module tests with:

./gradlew :sdks:java:io:google-cloud-platform:test

  • If this contribution is large, please file an Apache Individual Contributor License Agreement.
  • Replace these instructions with a description of your change and why you have made it.
  • Mention the appropriate issue in your description (for example: addresses #123 or fixes #456).
  • Update CHANGES.md with noteworthy changes.

See CONTRIBUTING.md for contribution guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant