Skip to content

Suspected data loss (and/or duplicates) bug in BigQueyrServicesImpl #20891

@damccorm

Description

@damccorm

When this API yields errors specific to failed inserts for a row.

Rows are selected here for retrying, using the errorIndex which is returned from the error.

retryRows.add(rowsToPublish.get(errorIndex));

However, this errorIndex is not valid to index rowsToPublish. So it looks like the wrong rows are being selected to be retried.

Why can't you use errorIndex to index rowsToPublish?

because rowsToPublish contains all of the rows which were passed into insertAll.

These are then batched into a smaller list of "rows" , where multpile API calls are made to bigquery to insert the rows. 

The errors returned actually refer to the list of rows passed into the call made to BigQuery, so they are only valid indices for "rows". Thus, they are not valid indices for "rowsToPublish".

Note: These lists have a different number of rows: rowsToPublish.size() > rows.size()

Imported from Jira BEAM-12139. Original Jira may contain additional context.
Reported by: ajamato@google.com.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions