Locks for reads within the transaction are not acquired on read.
Instead the locks are acquired on a commit to validate that
read/queried data has not changed since the transaction started.
Pessimistic
Pessimistic lock mode.
Read locks are acquired immediately on read.
Unspecified
Default value.
If the value is not specified, the pessimistic read lock is used.
[[["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-21 UTC."],[[["This page provides reference documentation for the `TransactionOptions.Types.ReadWrite.Types.ReadLockMode` enum within the Google Cloud Spanner v1 API."],["The latest version documented is 5.0.0-beta05, with version 4.6.0 being the current version shown, while a history of versions dating back to 3.5.0 are available."],["The `ReadLockMode` enum is used to define the locking behavior for read-write transactions, and it has three possible values: `Optimistic`, `Pessimistic`, and `Unspecified`."],["`Optimistic` mode does not lock on reads, but instead locks on commit, while `Pessimistic` mode acquires locks immediately on read, and `Unspecified` will default to the `Pessimistic` read lock."],["This enum is found within the `Google.Cloud.Spanner.V1` namespace and is contained in the `Google.Cloud.Spanner.V1.dll` assembly."]]],[]]