Skip to content

Ensure 0 backlog is sent when finishing processing restrictions. - #40102

Open
acrites wants to merge 1 commit into
apache:masterfrom
acrites:sdf-backlog-zero
Open

Ensure 0 backlog is sent when finishing processing restrictions.#40102
acrites wants to merge 1 commit into
apache:masterfrom
acrites:sdf-backlog-zero

Conversation

@acrites

@acrites acrites commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Dataflow keeps track of the last backlog reported by a given restriction. So when we finish processing a restriction completely, we should send a final 0 backlog signal.


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.

@github-actions

Copy link
Copy Markdown
Contributor

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

@acrites

acrites commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Some BQ test seems to be failing with this error:

Caused by: java.lang.RuntimeException: Append to stream projects/apache-beam-testing/datasets/bq_imt_it_98743009714697/tables/alo_create_98761217632706/streams/_default failed with Status Code FAILED_PRECONDITION. The stream may not exist.
	at org.apache.beam.sdk.io.gcp.bigquery.StorageApiWriteUnshardedRecords$WriteRecordsDoFn$DestinationState.lambda$flush$9(StorageApiWriteUnshardedRecords.java:855)
	at org.apache.beam.sdk.io.gcp.bigquery.RetryManager.await(RetryManager.java:319)
	at org.apache.beam.sdk.io.gcp.bigquery.StorageApiWriteUnshardedRecords$WriteRecordsDoFn.flushAll(StorageApiWriteUnshardedRecords.java:1067)
	at org.apache.beam.sdk.io.gcp.bigquery.StorageApiWriteUnshardedRecords$WriteRecordsDoFn.finishBundle(StorageApiWriteUnshardedRecords.java:1254)
Caused by: com.google.cloud.bigquery.storage.v1.Exceptions$StreamWriterClosedException: FAILED_PRECONDITION: Connection is closed due to com.google.api.gax.rpc.PermissionDeniedException: io.grpc.StatusRuntimeException: PERMISSION_DENIED: Permission 'TABLES_UPDATE_DATA' denied on resource 'projects/apache-beam-testing/datasets/bq_imt_it_98743009714697/tables/alo_create_98761217632706' (or it may not exist).
	at app//com.google.cloud.bigquery.storage.v1.ConnectionWorker.appendInternal(ConnectionWorker.java:927)
	at app//com.google.cloud.bigquery.storage.v1.ConnectionWorker.append(ConnectionWorker.java:854)
	at app//com.google.cloud.bigquery.storage.v1.StreamWriter$SingleConnectionOrConnectionPool.append(StreamWriter.java:196)
	at app//com.google.cloud.bigquery.storage.v1.StreamWriter.appendWithUniqueId(StreamWriter.java:638)
	at app//com.google.cloud.bigquery.storage.v1.StreamWriter.append(StreamWriter.java:605)
	at app//com.google.cloud.bigquery.storage.v1.StreamWriter.append(StreamWriter.java:509)
	at app//org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$WriteStreamServiceImpl$1.appendRows(BigQueryServicesImpl.java:1659)
	at app//org.apache.beam.sdk.io.gcp.bigquery.StorageApiWriteUnshardedRecords$WriteRecordsDoFn$DestinationState.lambda$flush$8(StorageApiWriteUnshardedRecords.java:666)
	at app//org.apache.beam.sdk.io.gcp.bigquery.RetryManager$Operation.run(RetryManager.java:166)
	at app//org.apache.beam.sdk.io.gcp.bigquery.RetryManager.run(RetryManager.java:292)
	at app//org.apache.beam.sdk.io.gcp.bigquery.RetryManager.await(RetryManager.java:332)
	at app//org.apache.beam.sdk.io.gcp.bigquery.StorageApiWriteUnshardedRecords$WriteRecordsDoFn.flushAll(StorageApiWriteUnshardedRecords.java:1067)
	at app//org.apache.beam.sdk.io.gcp.bigquery.StorageApiWriteUnshardedRecords$WriteRecordsDoFn.finishBundle(StorageApiWriteUnshardedRecords.java:1254)
	at app//org.apache.beam.sdk.io.gcp.bigquery.StorageApiWriteUnshardedRecords$WriteRecordsDoFn$DoFnInvoker$bf057275.invokeFinishBundle(Unknown Source)
	at app//org.apache.beam.runners.core.SimpleDoFnRunner.finishBundle(SimpleDoFnRunner.java:242)
	at app//org.apache.beam.runners.core.SimplePushbackSideInputDoFnRunner.finishBundle(SimplePushbackSideInputDoFnRunner.java:133)
	at app//org.apache.beam.runners.direct.ParDoEvaluator.finishBundle(ParDoEvaluator.java:270)
	at app//org.apache.beam.runners.direct.DoFnLifecycleManagerRemovingTransformEvaluator.finishBundle(DoFnLifecycleManagerRemovingTransformEvaluator.java:73)
	at app//org.apache.beam.runners.direct.DirectTransformExecutor.finishBundle(DirectTransformExecutor.java:194)
	at app//org.apache.beam.runners.direct.DirectTransformExecutor.run(DirectTransformExecutor.java:132)
	at java.base@21.0.11/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base@21.0.11/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base@21.0.11/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base@21.0.11/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base@21.0.11/java.lang.Thread.run(Thread.java:1583)

@acrites

acrites commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Run Java_GCP_IO_Direct PreCommit

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @tvalentyn added as fallback since no labels match configuration

This pull request likely touches a core component ("core" label). Please review with scrutiny.

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

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).

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