Module: Google::Cloud::Spanner::V1::TransactionOptions::IsolationLevel
- Defined in:
- proto_docs/google/spanner/v1/transaction.rb
Overview
IsolationLevel is used when setting isolation_level for a transaction.
Constant Summary collapse
- ISOLATION_LEVEL_UNSPECIFIED =
Default value.
If the value is not specified, the
SERIALIZABLEisolation level is used. 0- SERIALIZABLE =
All transactions appear as if they executed in a serial order, even if some of the reads, writes, and other operations of distinct transactions actually occurred in parallel. Spanner assigns commit timestamps that reflect the order of committed transactions to implement this property. Spanner offers a stronger guarantee than serializability called external consistency. For more information, see TrueTime and external consistency.
1- REPEATABLE_READ =
All reads performed during the transaction observe a consistent snapshot of the database, and the transaction is only successfully committed in the absence of conflicts between its updates and any concurrent updates that have occurred since that snapshot. Consequently, in contrast to
SERIALIZABLEtransactions, only write-write conflicts are detected in snapshot transactions.This isolation level does not support Read-only and Partitioned DML transactions.
When
REPEATABLE_READis specified on a read-write transaction, the locking semantics default toOPTIMISTIC. 2