bvolpato opened a new issue, #25319: URL: https://github.com/apache/beam/issues/25319
### What happened? When using `BigQueryIO` with `BigQueryStorageAvroReader` (see [BigQueryToParquet](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/bigquery-to-parquet/src/main/java/com/google/cloud/teleport/v2/templates/BigQueryToParquet.java) template), MutationDetectors fail with the exception: ``` Caused by: org.apache.beam.sdk.util.IllegalMutationException: PTransform ReadFromBigQuery/Read(BigQueryStorageTableSource) mutated value {"test_id": 2, "dxBa5HJ2L1": "lRc0"} after it was output (new value was {"test_id": 4, "dxBa5HJ2L1": "TDz"}). Values must not be mutated in any way after being output. at org.apache.beam.runners.direct.ImmutabilityCheckingBundleFactory$ImmutabilityEnforcingBundle.commit(ImmutabilityCheckingBundleFactory.java:137) at org.apache.beam.runners.direct.EvaluationContext.commitBundles(EvaluationContext.java:228) at org.apache.beam.runners.direct.EvaluationContext.handleResult(EvaluationContext.java:160) at org.apache.beam.runners.direct.QuiescenceDriver$TimerIterableCompletionCallback.handleResult(QuiescenceDriver.java:298) at org.apache.beam.runners.direct.DirectTransformExecutor.finishBundle(DirectTransformExecutor.java:194) at org.apache.beam.runners.direct.DirectTransformExecutor.run(DirectTransformExecutor.java:131) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.apache.beam.sdk.util.IllegalMutationException: Value {"test_id": 2, "dxBa5HJ2L1": "lRc0"} mutated illegally, new value was {"test_id": 4, "dxBa5HJ2L1": "TDz"}. Encoding was AgQCCGxSYzA, now AggCBlREeg. at org.apache.beam.sdk.util.MutationDetectors$CodedValueMutationDetector.illegalMutation(MutationDetectors.java:158) at org.apache.beam.sdk.util.MutationDetectors$CodedValueMutationDetector.verifyUnmodifiedThrowingCheckedExceptions(MutationDetectors.java:153) at org.apache.beam.sdk.util.MutationDetectors$CodedValueMutationDetector.verifyUnmodified(MutationDetectors.java:128) at org.apache.beam.runners.direct.ImmutabilityCheckingBundleFactory$ImmutabilityEnforcingBundle.commit(ImmutabilityCheckingBundleFactory.java:127) ... 10 common frames omitted ``` While DataflowRunner apparently runs without issues, this operation might be risky / non-deterministic. ### 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 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
