Repository navigation
Conversation
…ion on SDFs allows terminating immediately and changing to DROP TABLE IF EXISTS makes deletion idempotent.
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
The remaining failing PreCommit Spotless check says it's failing at |
|
2026-09-04T08:36:38.6399796Z [ant:checkstyle] [ERROR] /runner/_work/beam/beam/sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/cdc/sink/CdcRecord.java:20: You are using raw guava, please use vendored guava classes. [ForbidNonVendoredGuava] #40015 forward fix under way |
|
Run Spotless PreCommit |
|
assign set of reviewers |
|
Assigning reviewers: R: @Abacn for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
I would still like to get some feedback from the Spanner team on what the best drain behavior should be. This PR makes drain possible, but it makes it hard to resume from drain since the metadata table gets deleted. Is that ok for v1? A better solution would keep the metadata tables intact and then upon resuming we would scan these tables to somehow pick up where we left off. If we want to wait until we implement a resumable drain that's fine and I can just get rid of this PR. |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @ahmedabu98 for label java. Available commands:
|
|
Reminder, please take a look at this pr: @ahmedabu98 @nielm |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @kennknowles for label java. Available commands:
|
kennknowles
left a comment
There was a problem hiding this comment.
Seems fine to me, I guess! It is your PR description that gave me pause - why are there unbounded restrictions that are essentially unbounded? That's a discussion we don't have to have here (and not particularly something I need to get nosy about... 😄 )
|
waiting on author |
|
Let's go ahead and hold of on this implementation. I'll try to come up with something that would allow us to "resume" a drained pipeline by pointing it to the same metadata table. |
|
cc: @jiangzzhu |
Before this change, we were calling the default implementation of truncateRestriction on drain, which, for bounded restrictions tries to finish evaluating the entire restriction. Both SDF's in the Spanner CDC source use bounded restrictions that are effectively unbounded. Overriding truncateRestriction to return null on these SDFs allows terminating immediately.
In addition, we had to change the cleanup action from DROP TABLE to DROP TABLE IF EXISTS to make deletion idempotent. Otherwise, if that work item gets retried by the backend, it will start fail-looping, preventing drain from completing.
We don't have a great way to test drain here, but I ran a test pipeline on Dataflow and verified that it can now drain successfully.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.