beam icon indicating copy to clipboard operation
beam copied to clipboard

[Bug]: BigQuery streaming at-least-once job missing records

Open Amar3tto opened this issue 1 year ago • 2 comments

What happened?

During the execution of BigQuery streaming job (STORAGE_API_AT_LEAST_ONCE method) utilizing SyntheticUnboundedSource, a difference between the number of generated messages and the actual number of rows persisted in the BigQuery table was observed. It's possible that some records may not be fully processed or persisted before the job is marked as "Succeeded". Further investigation is required to pinpoint the root cause.

The issue was found during BigQueryIOST stress test (testJsonStorageAPIAtLeastOnce).

Issue Priority

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

Issue Components

  • [ ] Component: Python SDK
  • [X] 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: Spark Runner
  • [ ] Component: Flink Runner
  • [ ] Component: Samza Runner
  • [ ] Component: Twister2 Runner
  • [ ] Component: Hazelcast Jet Runner
  • [ ] Component: Google Cloud Dataflow Runner

Amar3tto avatar Jun 07 '24 12:06 Amar3tto

@Abacn, Could you please provide additional details on this issue since you are familiar with the context of the experiments that helped us determine it?

Amar3tto avatar Jun 07 '24 16:06 Amar3tto

We had issue on this assert before. It appears after #31241 this assert is still flaky, which means the expectation of

rowCount >= numRecords

is not always true.

Actually, in both EXACT_ONCE and AT_LEAST_ONCE, the on-the-fly records processed in Dataflow job can always have duplicates. For EXACT_ONCE the sink has dedup so

rowCount <= numRecords

is expected. For ATLEAST_ONCE, I suspect duplicate records may be introduced in both before and after the Beam counter, so there is not a definite relationship between rowCount and numRecords

Abacn avatar Oct 15 '24 14:10 Abacn

This issue has been marked as stale due to 150 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that’s incorrect or this issue still needs to be addressed, please simply write any comment. If closed, you can reopen the issue at any time. Thank you for your contributions.

github-actions[bot] avatar Oct 24 '25 12:10 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, you can reopen the issue at any time.

github-actions[bot] avatar Nov 24 '25 12:11 github-actions[bot]