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"]],[["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-08-07 UTC."],[[["\u003cp\u003eThis page provides reference documentation for the \u003ccode\u003eTransactionOptions.Types.ReadWrite.Types.ReadLockMode\u003c/code\u003e enum within the Google Cloud Spanner v1 API for .NET.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eReadLockMode\u003c/code\u003e enum is used to define the locking behavior for read-write transactions in Spanner, offering options for \u003ccode\u003eOptimistic\u003c/code\u003e, \u003ccode\u003ePessimistic\u003c/code\u003e, and \u003ccode\u003eUnspecified\u003c/code\u003e locking modes.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation lists various versions of the Google.Cloud.Spanner.V1 package, ranging from the latest beta (5.0.0-beta05) down to version 3.5.0, allowing users to select the version relevant to their project.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eOptimistic\u003c/code\u003e lock mode does not acquire locks on read, but instead on commit while \u003ccode\u003ePessimistic\u003c/code\u003e lock mode acquires locks immediately on read.\u003c/p\u003e\n"],["\u003cp\u003eIf unspecified, \u003ccode\u003ePessimistic\u003c/code\u003e lock mode will be used by default.\u003c/p\u003e\n"]]],[],null,[]]