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-18 UTC."],[[["This webpage provides documentation for the `TransactionRerunPolicy` class in the Google Cloud Spanner C++ client library, specifically for version 2.22.1 and other versions up to 2.37.0-rc."],["The `TransactionRerunPolicy` class determines if a failed transaction should be attempted again when using the `Client::Commit()` function, which handles the creation and application of mutations."],["The class contains multiple functions such as `clone()`, `OnFailure()`, `IsExhausted()`, and `IsPermanentFailure()` to manage the transaction retry logic."],["There are multiple versions of the documentation available, including the latest release candidate version, `2.37.0-rc`, and past releases down to `2.11.0`."],["The `Client::Commit()` function consumes a callable to create mutations or a list of mutations, creating a transaction and applying the mutations, and if it fails, this class will dictate whether it will attempt the transaction again."]]],[]]