bitnahian opened a new issue, #34608: URL: https://github.com/apache/beam/issues/34608
### What happened? Similar to https://github.com/apache/beam/issues/18521 Fails on the edge case when `finishBundle` is executed at the end of a bundle but `flushBatch` does not take into account duplicates before trying to write to Datastore. Possible solutions include removing duplicate mutations from `mutations` ArrayList before `flushBatch` or just using a HashMap of `mutations` instead of maintaining an ArrayList which can ensure uniqueness. ``` org.apache.beam.sdk.Pipeline$PipelineExecutionException: com.google.datastore.v1.client.DatastoreException: A non-transactional commit may not contain multiple mutations affecting the same entity., code=INVALID_ARGUMENT java.lang.RuntimeException: org.apache.beam.sdk.Pipeline$PipelineExecutionException: com.google.datastore.v1.client.DatastoreException: A non-transactional commit may not contain multiple mutations affecting the same entity., code=INVALID_ARGUMENT ``` ### 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 YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Infrastructure - [ ] 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: github-unsubscr...@beam.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org