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 details the `TransactionRerunPolicy` class within the Google Cloud Spanner C++ library, specifically for version 2.30.0 and other versions."],["The `TransactionRerunPolicy` determines if a Spanner transaction should be retried following a failure in the `Client::Commit()` function, which manages transaction creation and mutation application."],["The webpage lists available versions of the `TransactionRerunPolicy` class, including versions ranging from 2.11.0 to the latest release candidate, 2.37.0-rc."],["Key functions of the `TransactionRerunPolicy` class include `clone()`, `OnFailure(Status const &)`, `IsExhausted()`, and `IsPermanentFailure(Status const &)` which are all described in this document."],["The `Client::Commit()` function takes in a callable or list of mutations to apply, it will use an instance of the `TransactionRerunPolicy` if there are any failures during the transaction."]]],[]]