The base class for the Spanner library transaction rerun policies.
The Client::Commit() functions (there are several overloads) consume a callable to create mutations or a list of mutations. Commit() creates a transaction and applies the mutations. If the transaction fails, an instance of this class is used to control whether the transaction will be attempted again.
Functions
clone() const
Creates a new instance of the policy, reset to the initial state.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-26 UTC."],[[["This webpage provides documentation for the `TransactionRerunPolicy` class in the Google Cloud Spanner C++ library, which handles transaction retries."],["The `TransactionRerunPolicy` class is used by the `Client::Commit()` function to determine if a failed transaction should be retried."],["The documentation covers multiple versions of the `TransactionRerunPolicy` class, ranging from version 2.11.0 to 2.37.0-rc (latest)."],["Key functions of the class include `clone()`, `OnFailure(Status const &)`, `IsExhausted()`, and `IsPermanentFailure(Status const &)`, which manage policy creation, failure handling, retry status, and permanent failure checks, respectively."]]],[]]