beam icon indicating copy to clipboard operation
beam copied to clipboard

Suppress BigQuery read stream splitAtFraction when API busy call or timeout

Open Abacn opened this issue 1 year ago • 4 comments

Resolve https://github.com/apache/beam/issues/30646#issuecomment-2080102737

  • Reject split attempt early when there is an ongoing hasNext call in work item thread

  • TImeout hasNext call in splitAtFraction in alignment with client splitReadStreamSettings

The issue exist on both released Beam and after #31096

Tested on read stream API v1 (default) and Dataflow legacy runner in a quota restricted project:

image

Without the change, the pipeline appears to stuck indefinitely. the onRetryAttempt callback get called periodically.

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • [ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • [ ] Update CHANGES.md with noteworthy changes.
  • [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels Python tests Java tests Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

Abacn avatar Apr 27 '24 00:04 Abacn

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

github-actions[bot] avatar Apr 27 '24 01:04 github-actions[bot]

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @damondouglas for label java. R: @chamikaramj for label io.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

github-actions[bot] avatar Apr 29 '24 18:04 github-actions[bot]

R: @ahmedabu98 (since you reviewed #31096)

Abacn avatar Apr 30 '24 20:04 Abacn

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

github-actions[bot] avatar Apr 30 '24 20:04 github-actions[bot]

Codecov Report

Attention: Patch coverage is 53.84615% with 6 lines in your changes missing coverage. Please review.

Project coverage is 60.41%. Comparing base (b34cf54) to head (4b3dd6a). Report is 1077 commits behind head on master.

Files with missing lines Patch % Lines
...k/io/gcp/bigquery/BigQueryStorageStreamSource.java 53.84% 6 Missing :warning:
Additional details and impacted files
@@              Coverage Diff              @@
##             master   #31125       +/-   ##
=============================================
- Coverage     71.44%   60.41%   -11.04%     
- Complexity     1474     2981     +1507     
=============================================
  Files           906      659      -247     
  Lines        113271    66095    -47176     
  Branches       1076     3233     +2157     
=============================================
- Hits          80931    39930    -41001     
+ Misses        30327    23066     -7261     
- Partials       2013     3099     +1086     
Flag Coverage Δ
java 68.62% <53.84%> (+0.04%) :arrow_up:
python ?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 06 '24 19:05 codecov-commenter