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-03-14 UTC."],[[["This webpage provides documentation for the `TransactionRerunPolicy` class in the Google Cloud Spanner C++ library, with links to documentation across a range of library versions."],["The `TransactionRerunPolicy` class determines if a Spanner transaction should be retried after a failure by evaluating the transaction's status."],["The `Client::Commit()` function, which is part of the Spanner library, uses `TransactionRerunPolicy` to handle potential failures and decide if retries are needed."],["The class offers functions such as `OnFailure()`, `IsExhausted()`, and `IsPermanentFailure()` to check the status of a transaction and to make a decision about whether a transaction should be rerun."],["The function `clone()` can be used to make a new copy of the `TransactionRerunPolicy` class."]]],[]]