database.batch does not retry aborted transactions #1133
Labels
api: spanner
Issues related to the googleapis/python-spanner API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
The standard example for writing data with mutations uses
database.batch
: https://cloud.google.com/spanner/docs/getting-started/python#write-data-with-mutationsdatabase.batch
however does not automatically retry the transaction if it is aborted by Spanner. This causes errors if you try to use this method to insert a large amount of data, or if there are lock contentions on the data that you insert.Either:
run_in_transaction
to use mutations.database.batch
should also automatically retry aborted transactions.The text was updated successfully, but these errors were encountered: