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"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["This webpage details the `TransactionRerunPolicy` class within the Google Cloud Spanner C++ library, which manages the conditions under which transactions are retried."],["The `Client::Commit()` function utilizes the `TransactionRerunPolicy` to determine if a failed transaction should be re-attempted, involving either a mutation-generating callable or a list of mutations."],["The webpage lists numerous versions of the Spanner library, starting from version 2.37.0-rc (the latest) down to version 2.11.0, with each version offering a link to the respective `TransactionRerunPolicy` documentation."],["Key functions of the `TransactionRerunPolicy` include `clone()` for creating new policy instances, `OnFailure()` for handling failed transactions, and `IsExhausted()` and `IsPermanentFailure()` for determining retry status."]]],[]]