Repository navigation
Conversation
Record a per-pipeline run id during InitializeDoFn and skip re-execution when the metadata already belongs to the same run, so RESUME_OR_NEW cannot start a second consumer chain inside one job. Fixes apache#39970
9d2bfeb to
0cd0661
Compare
Use a unique change stream name per test and mark prior-job metadata in the resume case so shared emulator rows do not skip initialization.
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
Assigning reviewers: R: @mutianf for label bigtable. 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). |
…e-resume-or-new Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com> # Conflicts: # CHANGES.md
…e-resume-or-new Keep the BigtableIO RESUME_OR_NEW note in the 2.79.0 unreleased bugfixes.
|
Reminder, please take a look at this pr: @mutianf |
|
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: @chamikaramj for label bigtable. Available commands:
|
Summary
BigtableIO.readChangeStream()usesExistingPipelineOptions.RESUME_OR_NEW, a re-executedInitializeDoFn(e.g. Dataflow bundle retry) could see Detect New Partition metadata written by the same job and take the resume path, emitting a secondInitialPipelineStateand starting duplicate change-stream consumers.InitializeDoFnoutput when the stored id matches the current run. A genuinely new job still resumes when the stored id differs.Fixes #39970
Test plan
InitializeDoFnTest.testInitializeSkipsDuplicatePipelineRun(emulator)./gradlew :sdks:java:io:google-cloud-platform:test --tests org.apache.beam.sdk.io.gcp.bigtable.changestreams.dofn.InitializeDoFnTest(local run hit disk pressure on cold clone; CI expected to run)