Skip to content

[Bug]: DatastoreIO.Write fails multiple mutations of same entity on finishBundle #34608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 17 tasks
bitnahian opened this issue Apr 11, 2025 · 2 comments · May be fixed by #34679
Open
1 of 17 tasks

[Bug]: DatastoreIO.Write fails multiple mutations of same entity on finishBundle #34608

bitnahian opened this issue Apr 11, 2025 · 2 comments · May be fixed by #34679

Comments

@bitnahian
Copy link
Contributor

What happened?

Similar to #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
  • 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
@bitnahian
Copy link
Contributor Author

.add-labels gcp,io,java

@SaumilPatel03
Copy link
Contributor

.take-issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment