Spanner: TransactionRunner.run() sometimes doesn't retry on ABORTED #4939
Labels
api: spanner
Issues related to the Spanner API.
type: question
Request for information or clarification. Not an issue.
Hello, we've noticed that sometimes running executeUpdate throws an AbortedException (directly from inside executeUpdate). This happens, for example, when running queries like
DELETE FROM Table WHERE true
. When this happens inside TransactionRunner.run(), the transaction is not automatically retried, but the AbortedException is immediately rethrown to the caller. Note that the AbortedException appears to be thrown fromexecuteUpdate
, not transaction.commit().The message in the exception says something like:
We've found that if we wrap this in a retry loop, it does in fact succeed as suggested. We're wondering whether this is a case that should be handled by TransactionRunner's retry logic, or whether there's something we should be doing differently in our code. Thanks!
Environment details
Code example
Stack trace
The text was updated successfully, but these errors were encountered: