google-apis-spanner_v1 0.11.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/google/apis/spanner_v1/classes.rb +219 -187
- data/lib/google/apis/spanner_v1/gem_version.rb +3 -3
- data/lib/google/apis/spanner_v1/representations.rb +4 -0
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 841f47e49585a9b462f1914af15f5e329bc3bdb97ee9f964dee6044b72259bd6
|
4
|
+
data.tar.gz: 0f2c84cd89461e41a82d96403472dd72a68b1fb2850255f5fb290d10ac96a1a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddb44f893976b7f56b2d08d77d11e87666f93c00a0a25dba96c12904b1bd160e4aba2c574e72f1019f26df022a10bfebe8cfd80c4902cfd2c69f32110fdfed7c
|
7
|
+
data.tar.gz: b0430f0754171790362e5611f3c70ddbe4621a04f503df2d127a06fe844d2d19b9cab533bf0780bdd20473a47cb1abad608f4696e22bdf527c50c209dda778ac
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# Release history for google-apis-spanner_v1
|
2
2
|
|
3
|
+
### v0.15.0 (2021-07-12)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210703
|
6
|
+
|
7
|
+
### v0.14.0 (2021-07-03)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20210624
|
10
|
+
* Regenerated using generator version 0.4.0
|
11
|
+
* Unspecified changes
|
12
|
+
|
13
|
+
### v0.13.0 (2021-06-17)
|
14
|
+
|
15
|
+
* Regenerated from discovery document revision 20210611
|
16
|
+
|
17
|
+
### v0.12.0 (2021-06-10)
|
18
|
+
|
19
|
+
* Regenerated from discovery document revision 20210603
|
20
|
+
|
3
21
|
### v0.11.0 (2021-06-03)
|
4
22
|
|
5
23
|
* Regenerated from discovery document revision 20210527
|
@@ -201,12 +201,12 @@ module Google
|
|
201
201
|
class BeginTransactionRequest
|
202
202
|
include Google::Apis::Core::Hashable
|
203
203
|
|
204
|
-
#
|
204
|
+
# Transactions: Each session can have at most one active transaction at a time (
|
205
205
|
# note that standalone reads and queries use a transaction internally and do
|
206
206
|
# count towards the one transaction limit). After the active transaction is
|
207
207
|
# completed, the session can immediately be re-used for the next transaction. It
|
208
|
-
# is not necessary to create a new session for each transaction.
|
209
|
-
# Modes Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
208
|
+
# is not necessary to create a new session for each transaction. Transaction
|
209
|
+
# Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
210
210
|
# This type of transaction is the only way to write data into Cloud Spanner.
|
211
211
|
# These transactions rely on pessimistic locking and, if necessary, two-phase
|
212
212
|
# commit. Locking read-write transactions may abort, requiring the application
|
@@ -224,8 +224,8 @@ module Google
|
|
224
224
|
# transactions. As a consequence of not taking locks, they also do not abort, so
|
225
225
|
# retry loops are not needed. Transactions may only read/write data in a single
|
226
226
|
# database. They may, however, read/write data in different tables within that
|
227
|
-
# database.
|
228
|
-
#
|
227
|
+
# database. Locking Read-Write Transactions: Locking transactions may be used to
|
228
|
+
# atomically read-modify-write data anywhere in a database. This type of
|
229
229
|
# transaction is externally consistent. Clients should attempt to minimize the
|
230
230
|
# amount of time a transaction is active. Faster transactions commit with higher
|
231
231
|
# probability and cause less contention. Cloud Spanner attempts to keep read
|
@@ -234,7 +234,7 @@ module Google
|
|
234
234
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
235
235
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
236
236
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
237
|
-
# the client can send a Rollback request to abort the transaction.
|
237
|
+
# the client can send a Rollback request to abort the transaction. Semantics:
|
238
238
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
239
239
|
# still valid at commit time, and it is able to acquire write locks for all
|
240
240
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -242,24 +242,24 @@ module Google
|
|
242
242
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
243
243
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
244
244
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
245
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
251
|
-
#
|
252
|
-
#
|
253
|
-
#
|
254
|
-
#
|
255
|
-
#
|
256
|
-
#
|
257
|
-
#
|
258
|
-
#
|
259
|
-
#
|
260
|
-
#
|
261
|
-
#
|
262
|
-
# becoming idle.
|
245
|
+
# exclusion other than between Cloud Spanner transactions themselves. Retrying
|
246
|
+
# Aborted Transactions: When a transaction aborts, the application can choose to
|
247
|
+
# retry the whole transaction again. To maximize the chances of successfully
|
248
|
+
# committing the retry, the client should execute the retry in the same session
|
249
|
+
# as the original attempt. The original session's lock priority increases with
|
250
|
+
# each consecutive abort, meaning that each attempt has a slightly better chance
|
251
|
+
# of success than the previous. Under some circumstances (e.g., many
|
252
|
+
# transactions attempting to modify the same row(s)), a transaction can abort
|
253
|
+
# many times in a short period before successfully committing. Thus, it is not a
|
254
|
+
# good idea to cap the number of retries a transaction can attempt; instead, it
|
255
|
+
# is better to limit the total amount of wall time spent retrying. Idle
|
256
|
+
# Transactions: A transaction is considered idle if it has no outstanding reads
|
257
|
+
# or SQL queries and has not started a read or SQL query within the last 10
|
258
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they don't
|
259
|
+
# hold on to locks indefinitely. In that case, the commit will fail with error `
|
260
|
+
# ABORTED`. If this behavior is undesirable, periodically executing a simple SQL
|
261
|
+
# query in the transaction (e.g., `SELECT 1`) prevents the transaction from
|
262
|
+
# becoming idle. Snapshot Read-Only Transactions: Snapshot read-only
|
263
263
|
# transactions provides a simpler method than locking read-write transactions
|
264
264
|
# for doing several consistent reads. However, this type of transaction does not
|
265
265
|
# support writes. Snapshot transactions do not take locks. Instead, they work by
|
@@ -277,15 +277,15 @@ module Google
|
|
277
277
|
# is geographically distributed, stale read-only transactions can execute more
|
278
278
|
# quickly than strong or read-write transaction, because they are able to
|
279
279
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
280
|
-
# in detail below.
|
281
|
-
#
|
280
|
+
# in detail below. Strong: Strong reads are guaranteed to see the effects of all
|
281
|
+
# transactions that have committed before the start of the read. Furthermore,
|
282
282
|
# all rows yielded by a single read are consistent with each other -- if any
|
283
283
|
# part of the read observes a transaction, all parts of the read see the
|
284
284
|
# transaction. Strong reads are not repeatable: two consecutive strong read-only
|
285
285
|
# transactions might return inconsistent results if there are concurrent writes.
|
286
286
|
# If consistency across reads is required, the reads should be executed within a
|
287
287
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
288
|
-
# strong.
|
288
|
+
# strong. Exact Staleness: These timestamp bounds execute reads at a user-
|
289
289
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
290
290
|
# prefix of the global transaction history: they observe modifications done by
|
291
291
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -297,8 +297,8 @@ module Google
|
|
297
297
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
298
298
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
299
299
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
300
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
301
|
-
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
300
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded
|
301
|
+
# Staleness: Bounded staleness modes allow Cloud Spanner to pick the read
|
302
302
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
303
303
|
# the newest timestamp within the staleness bound that allows execution of the
|
304
304
|
# reads at the closest available replica without blocking. All rows yielded are
|
@@ -315,15 +315,15 @@ module Google
|
|
315
315
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
316
316
|
# it can only be used with single-use read-only transactions. See
|
317
317
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
318
|
-
# min_read_timestamp.
|
319
|
-
#
|
320
|
-
#
|
321
|
-
#
|
322
|
-
#
|
323
|
-
#
|
318
|
+
# min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner
|
319
|
+
# continuously garbage collects deleted and overwritten data in the background
|
320
|
+
# to reclaim storage space. This process is known as "version GC". By default,
|
321
|
+
# version GC reclaims versions after they are one hour old. Because of this,
|
322
|
+
# Cloud Spanner cannot perform reads at read timestamps more than one hour in
|
323
|
+
# the past. This restriction also applies to in-progress reads and/or SQL
|
324
324
|
# queries whose timestamp become too old while executing. Reads and SQL queries
|
325
|
-
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
326
|
-
# Partitioned DML Transactions Partitioned DML transactions are used to execute
|
325
|
+
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
326
|
+
# Partitioned DML Transactions: Partitioned DML transactions are used to execute
|
327
327
|
# DML statements with a different execution strategy that provides different,
|
328
328
|
# and often better, scalability properties for large, table-wide operations than
|
329
329
|
# DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP
|
@@ -512,12 +512,12 @@ module Google
|
|
512
512
|
attr_accessor :return_commit_stats
|
513
513
|
alias_method :return_commit_stats?, :return_commit_stats
|
514
514
|
|
515
|
-
#
|
515
|
+
# Transactions: Each session can have at most one active transaction at a time (
|
516
516
|
# note that standalone reads and queries use a transaction internally and do
|
517
517
|
# count towards the one transaction limit). After the active transaction is
|
518
518
|
# completed, the session can immediately be re-used for the next transaction. It
|
519
|
-
# is not necessary to create a new session for each transaction.
|
520
|
-
# Modes Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
519
|
+
# is not necessary to create a new session for each transaction. Transaction
|
520
|
+
# Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
521
521
|
# This type of transaction is the only way to write data into Cloud Spanner.
|
522
522
|
# These transactions rely on pessimistic locking and, if necessary, two-phase
|
523
523
|
# commit. Locking read-write transactions may abort, requiring the application
|
@@ -535,8 +535,8 @@ module Google
|
|
535
535
|
# transactions. As a consequence of not taking locks, they also do not abort, so
|
536
536
|
# retry loops are not needed. Transactions may only read/write data in a single
|
537
537
|
# database. They may, however, read/write data in different tables within that
|
538
|
-
# database.
|
539
|
-
#
|
538
|
+
# database. Locking Read-Write Transactions: Locking transactions may be used to
|
539
|
+
# atomically read-modify-write data anywhere in a database. This type of
|
540
540
|
# transaction is externally consistent. Clients should attempt to minimize the
|
541
541
|
# amount of time a transaction is active. Faster transactions commit with higher
|
542
542
|
# probability and cause less contention. Cloud Spanner attempts to keep read
|
@@ -545,7 +545,7 @@ module Google
|
|
545
545
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
546
546
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
547
547
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
548
|
-
# the client can send a Rollback request to abort the transaction.
|
548
|
+
# the client can send a Rollback request to abort the transaction. Semantics:
|
549
549
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
550
550
|
# still valid at commit time, and it is able to acquire write locks for all
|
551
551
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -553,24 +553,24 @@ module Google
|
|
553
553
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
554
554
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
555
555
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
556
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
557
|
-
#
|
558
|
-
#
|
559
|
-
#
|
560
|
-
#
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
#
|
570
|
-
#
|
571
|
-
#
|
572
|
-
#
|
573
|
-
# becoming idle.
|
556
|
+
# exclusion other than between Cloud Spanner transactions themselves. Retrying
|
557
|
+
# Aborted Transactions: When a transaction aborts, the application can choose to
|
558
|
+
# retry the whole transaction again. To maximize the chances of successfully
|
559
|
+
# committing the retry, the client should execute the retry in the same session
|
560
|
+
# as the original attempt. The original session's lock priority increases with
|
561
|
+
# each consecutive abort, meaning that each attempt has a slightly better chance
|
562
|
+
# of success than the previous. Under some circumstances (e.g., many
|
563
|
+
# transactions attempting to modify the same row(s)), a transaction can abort
|
564
|
+
# many times in a short period before successfully committing. Thus, it is not a
|
565
|
+
# good idea to cap the number of retries a transaction can attempt; instead, it
|
566
|
+
# is better to limit the total amount of wall time spent retrying. Idle
|
567
|
+
# Transactions: A transaction is considered idle if it has no outstanding reads
|
568
|
+
# or SQL queries and has not started a read or SQL query within the last 10
|
569
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they don't
|
570
|
+
# hold on to locks indefinitely. In that case, the commit will fail with error `
|
571
|
+
# ABORTED`. If this behavior is undesirable, periodically executing a simple SQL
|
572
|
+
# query in the transaction (e.g., `SELECT 1`) prevents the transaction from
|
573
|
+
# becoming idle. Snapshot Read-Only Transactions: Snapshot read-only
|
574
574
|
# transactions provides a simpler method than locking read-write transactions
|
575
575
|
# for doing several consistent reads. However, this type of transaction does not
|
576
576
|
# support writes. Snapshot transactions do not take locks. Instead, they work by
|
@@ -588,15 +588,15 @@ module Google
|
|
588
588
|
# is geographically distributed, stale read-only transactions can execute more
|
589
589
|
# quickly than strong or read-write transaction, because they are able to
|
590
590
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
591
|
-
# in detail below.
|
592
|
-
#
|
591
|
+
# in detail below. Strong: Strong reads are guaranteed to see the effects of all
|
592
|
+
# transactions that have committed before the start of the read. Furthermore,
|
593
593
|
# all rows yielded by a single read are consistent with each other -- if any
|
594
594
|
# part of the read observes a transaction, all parts of the read see the
|
595
595
|
# transaction. Strong reads are not repeatable: two consecutive strong read-only
|
596
596
|
# transactions might return inconsistent results if there are concurrent writes.
|
597
597
|
# If consistency across reads is required, the reads should be executed within a
|
598
598
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
599
|
-
# strong.
|
599
|
+
# strong. Exact Staleness: These timestamp bounds execute reads at a user-
|
600
600
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
601
601
|
# prefix of the global transaction history: they observe modifications done by
|
602
602
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -608,8 +608,8 @@ module Google
|
|
608
608
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
609
609
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
610
610
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
611
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
612
|
-
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
611
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded
|
612
|
+
# Staleness: Bounded staleness modes allow Cloud Spanner to pick the read
|
613
613
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
614
614
|
# the newest timestamp within the staleness bound that allows execution of the
|
615
615
|
# reads at the closest available replica without blocking. All rows yielded are
|
@@ -626,15 +626,15 @@ module Google
|
|
626
626
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
627
627
|
# it can only be used with single-use read-only transactions. See
|
628
628
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
629
|
-
# min_read_timestamp.
|
630
|
-
#
|
631
|
-
#
|
632
|
-
#
|
633
|
-
#
|
634
|
-
#
|
629
|
+
# min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner
|
630
|
+
# continuously garbage collects deleted and overwritten data in the background
|
631
|
+
# to reclaim storage space. This process is known as "version GC". By default,
|
632
|
+
# version GC reclaims versions after they are one hour old. Because of this,
|
633
|
+
# Cloud Spanner cannot perform reads at read timestamps more than one hour in
|
634
|
+
# the past. This restriction also applies to in-progress reads and/or SQL
|
635
635
|
# queries whose timestamp become too old while executing. Reads and SQL queries
|
636
|
-
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
637
|
-
# Partitioned DML Transactions Partitioned DML transactions are used to execute
|
636
|
+
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
637
|
+
# Partitioned DML Transactions: Partitioned DML transactions are used to execute
|
638
638
|
# DML statements with a different execution strategy that provides different,
|
639
639
|
# and often better, scalability properties for large, table-wide operations than
|
640
640
|
# DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP
|
@@ -980,6 +980,14 @@ module Google
|
|
980
980
|
# @return [String]
|
981
981
|
attr_accessor :create_time
|
982
982
|
|
983
|
+
# Output only. The read-write region which contains the database's leader
|
984
|
+
# replicas. This is the same as the value of default_leader database option set
|
985
|
+
# using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not
|
986
|
+
# explicitly set, this is empty.
|
987
|
+
# Corresponds to the JSON property `defaultLeader`
|
988
|
+
# @return [String]
|
989
|
+
attr_accessor :default_leader
|
990
|
+
|
983
991
|
# Output only. Earliest timestamp at which older versions of the data can be
|
984
992
|
# read. This value is continuously updated by Cloud Spanner and becomes stale
|
985
993
|
# the moment it is queried. If you are using this value to recover data, make
|
@@ -1036,6 +1044,7 @@ module Google
|
|
1036
1044
|
# Update properties of this object
|
1037
1045
|
def update!(**args)
|
1038
1046
|
@create_time = args[:create_time] if args.key?(:create_time)
|
1047
|
+
@default_leader = args[:default_leader] if args.key?(:default_leader)
|
1039
1048
|
@earliest_version_time = args[:earliest_version_time] if args.key?(:earliest_version_time)
|
1040
1049
|
@encryption_config = args[:encryption_config] if args.key?(:encryption_config)
|
1041
1050
|
@encryption_info = args[:encryption_info] if args.key?(:encryption_info)
|
@@ -1672,6 +1681,13 @@ module Google
|
|
1672
1681
|
# @return [Fixnum]
|
1673
1682
|
attr_accessor :node_count
|
1674
1683
|
|
1684
|
+
# The number of processing units allocated to this instance. At most one of
|
1685
|
+
# processing_units or node_count should be present in the message. This may be
|
1686
|
+
# zero in API responses for instances that are not yet in state `READY`.
|
1687
|
+
# Corresponds to the JSON property `processingUnits`
|
1688
|
+
# @return [Fixnum]
|
1689
|
+
attr_accessor :processing_units
|
1690
|
+
|
1675
1691
|
# Output only. The current instance state. For CreateInstance, the state must be
|
1676
1692
|
# either omitted or set to `CREATING`. For UpdateInstance, the state must be
|
1677
1693
|
# either omitted or set to `READY`.
|
@@ -1691,6 +1707,7 @@ module Google
|
|
1691
1707
|
@labels = args[:labels] if args.key?(:labels)
|
1692
1708
|
@name = args[:name] if args.key?(:name)
|
1693
1709
|
@node_count = args[:node_count] if args.key?(:node_count)
|
1710
|
+
@processing_units = args[:processing_units] if args.key?(:processing_units)
|
1694
1711
|
@state = args[:state] if args.key?(:state)
|
1695
1712
|
end
|
1696
1713
|
end
|
@@ -1705,6 +1722,12 @@ module Google
|
|
1705
1722
|
# @return [String]
|
1706
1723
|
attr_accessor :display_name
|
1707
1724
|
|
1725
|
+
# Allowed values of the “default_leader” schema option for databases in
|
1726
|
+
# instances that use this instance configuration.
|
1727
|
+
# Corresponds to the JSON property `leaderOptions`
|
1728
|
+
# @return [Array<String>]
|
1729
|
+
attr_accessor :leader_options
|
1730
|
+
|
1708
1731
|
# A unique identifier for the instance configuration. Values are of the form `
|
1709
1732
|
# projects//instanceConfigs/a-z*`
|
1710
1733
|
# Corresponds to the JSON property `name`
|
@@ -1724,6 +1747,7 @@ module Google
|
|
1724
1747
|
# Update properties of this object
|
1725
1748
|
def update!(**args)
|
1726
1749
|
@display_name = args[:display_name] if args.key?(:display_name)
|
1750
|
+
@leader_options = args[:leader_options] if args.key?(:leader_options)
|
1727
1751
|
@name = args[:name] if args.key?(:name)
|
1728
1752
|
@replicas = args[:replicas] if args.key?(:replicas)
|
1729
1753
|
end
|
@@ -1839,6 +1863,11 @@ module Google
|
|
1839
1863
|
# @return [Fixnum]
|
1840
1864
|
attr_accessor :start_key_index
|
1841
1865
|
|
1866
|
+
# The time offset. This is the time since the start of the time interval.
|
1867
|
+
# Corresponds to the JSON property `timeOffset`
|
1868
|
+
# @return [String]
|
1869
|
+
attr_accessor :time_offset
|
1870
|
+
|
1842
1871
|
# A message representing a user-facing string whose value may need to be
|
1843
1872
|
# translated before being displayed.
|
1844
1873
|
# Corresponds to the JSON property `unit`
|
@@ -1862,6 +1891,7 @@ module Google
|
|
1862
1891
|
@keys_count = args[:keys_count] if args.key?(:keys_count)
|
1863
1892
|
@metric = args[:metric] if args.key?(:metric)
|
1864
1893
|
@start_key_index = args[:start_key_index] if args.key?(:start_key_index)
|
1894
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
1865
1895
|
@unit = args[:unit] if args.key?(:unit)
|
1866
1896
|
@value = args[:value] if args.key?(:value)
|
1867
1897
|
end
|
@@ -3305,7 +3335,8 @@ module Google
|
|
3305
3335
|
# requests where it's not applicable (e.g. CommitRequest). Legal characters for `
|
3306
3336
|
# request_tag` values are all printable characters (ASCII 32 - 126) and the
|
3307
3337
|
# length of a request_tag is limited to 50 characters. Values that exceed this
|
3308
|
-
# limit are truncated.
|
3338
|
+
# limit are truncated. Any leading underscore (_) characters will be removed
|
3339
|
+
# from the string.
|
3309
3340
|
# Corresponds to the JSON property `requestTag`
|
3310
3341
|
# @return [String]
|
3311
3342
|
attr_accessor :request_tag
|
@@ -3317,7 +3348,8 @@ module Google
|
|
3317
3348
|
# transaction, transaction_tag will be ignored. Legal characters for `
|
3318
3349
|
# transaction_tag` values are all printable characters (ASCII 32 - 126) and the
|
3319
3350
|
# length of a transaction_tag is limited to 50 characters. Values that exceed
|
3320
|
-
# this limit are truncated.
|
3351
|
+
# this limit are truncated. Any leading underscore (_) characters will be
|
3352
|
+
# removed from the string.
|
3321
3353
|
# Corresponds to the JSON property `transactionTag`
|
3322
3354
|
# @return [String]
|
3323
3355
|
attr_accessor :transaction_tag
|
@@ -3975,12 +4007,12 @@ module Google
|
|
3975
4007
|
end
|
3976
4008
|
end
|
3977
4009
|
|
3978
|
-
#
|
4010
|
+
# Transactions: Each session can have at most one active transaction at a time (
|
3979
4011
|
# note that standalone reads and queries use a transaction internally and do
|
3980
4012
|
# count towards the one transaction limit). After the active transaction is
|
3981
4013
|
# completed, the session can immediately be re-used for the next transaction. It
|
3982
|
-
# is not necessary to create a new session for each transaction.
|
3983
|
-
# Modes Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4014
|
+
# is not necessary to create a new session for each transaction. Transaction
|
4015
|
+
# Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
3984
4016
|
# This type of transaction is the only way to write data into Cloud Spanner.
|
3985
4017
|
# These transactions rely on pessimistic locking and, if necessary, two-phase
|
3986
4018
|
# commit. Locking read-write transactions may abort, requiring the application
|
@@ -3998,8 +4030,8 @@ module Google
|
|
3998
4030
|
# transactions. As a consequence of not taking locks, they also do not abort, so
|
3999
4031
|
# retry loops are not needed. Transactions may only read/write data in a single
|
4000
4032
|
# database. They may, however, read/write data in different tables within that
|
4001
|
-
# database.
|
4002
|
-
#
|
4033
|
+
# database. Locking Read-Write Transactions: Locking transactions may be used to
|
4034
|
+
# atomically read-modify-write data anywhere in a database. This type of
|
4003
4035
|
# transaction is externally consistent. Clients should attempt to minimize the
|
4004
4036
|
# amount of time a transaction is active. Faster transactions commit with higher
|
4005
4037
|
# probability and cause less contention. Cloud Spanner attempts to keep read
|
@@ -4008,7 +4040,7 @@ module Google
|
|
4008
4040
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
4009
4041
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
4010
4042
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
4011
|
-
# the client can send a Rollback request to abort the transaction.
|
4043
|
+
# the client can send a Rollback request to abort the transaction. Semantics:
|
4012
4044
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
4013
4045
|
# still valid at commit time, and it is able to acquire write locks for all
|
4014
4046
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -4016,24 +4048,24 @@ module Google
|
|
4016
4048
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
4017
4049
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
4018
4050
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
4019
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
4020
|
-
#
|
4021
|
-
#
|
4022
|
-
#
|
4023
|
-
#
|
4024
|
-
#
|
4025
|
-
#
|
4026
|
-
#
|
4027
|
-
#
|
4028
|
-
#
|
4029
|
-
#
|
4030
|
-
#
|
4031
|
-
#
|
4032
|
-
#
|
4033
|
-
#
|
4034
|
-
#
|
4035
|
-
#
|
4036
|
-
# becoming idle.
|
4051
|
+
# exclusion other than between Cloud Spanner transactions themselves. Retrying
|
4052
|
+
# Aborted Transactions: When a transaction aborts, the application can choose to
|
4053
|
+
# retry the whole transaction again. To maximize the chances of successfully
|
4054
|
+
# committing the retry, the client should execute the retry in the same session
|
4055
|
+
# as the original attempt. The original session's lock priority increases with
|
4056
|
+
# each consecutive abort, meaning that each attempt has a slightly better chance
|
4057
|
+
# of success than the previous. Under some circumstances (e.g., many
|
4058
|
+
# transactions attempting to modify the same row(s)), a transaction can abort
|
4059
|
+
# many times in a short period before successfully committing. Thus, it is not a
|
4060
|
+
# good idea to cap the number of retries a transaction can attempt; instead, it
|
4061
|
+
# is better to limit the total amount of wall time spent retrying. Idle
|
4062
|
+
# Transactions: A transaction is considered idle if it has no outstanding reads
|
4063
|
+
# or SQL queries and has not started a read or SQL query within the last 10
|
4064
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they don't
|
4065
|
+
# hold on to locks indefinitely. In that case, the commit will fail with error `
|
4066
|
+
# ABORTED`. If this behavior is undesirable, periodically executing a simple SQL
|
4067
|
+
# query in the transaction (e.g., `SELECT 1`) prevents the transaction from
|
4068
|
+
# becoming idle. Snapshot Read-Only Transactions: Snapshot read-only
|
4037
4069
|
# transactions provides a simpler method than locking read-write transactions
|
4038
4070
|
# for doing several consistent reads. However, this type of transaction does not
|
4039
4071
|
# support writes. Snapshot transactions do not take locks. Instead, they work by
|
@@ -4051,15 +4083,15 @@ module Google
|
|
4051
4083
|
# is geographically distributed, stale read-only transactions can execute more
|
4052
4084
|
# quickly than strong or read-write transaction, because they are able to
|
4053
4085
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
4054
|
-
# in detail below.
|
4055
|
-
#
|
4086
|
+
# in detail below. Strong: Strong reads are guaranteed to see the effects of all
|
4087
|
+
# transactions that have committed before the start of the read. Furthermore,
|
4056
4088
|
# all rows yielded by a single read are consistent with each other -- if any
|
4057
4089
|
# part of the read observes a transaction, all parts of the read see the
|
4058
4090
|
# transaction. Strong reads are not repeatable: two consecutive strong read-only
|
4059
4091
|
# transactions might return inconsistent results if there are concurrent writes.
|
4060
4092
|
# If consistency across reads is required, the reads should be executed within a
|
4061
4093
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
4062
|
-
# strong.
|
4094
|
+
# strong. Exact Staleness: These timestamp bounds execute reads at a user-
|
4063
4095
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
4064
4096
|
# prefix of the global transaction history: they observe modifications done by
|
4065
4097
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -4071,8 +4103,8 @@ module Google
|
|
4071
4103
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
4072
4104
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
4073
4105
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
4074
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
4075
|
-
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
4106
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded
|
4107
|
+
# Staleness: Bounded staleness modes allow Cloud Spanner to pick the read
|
4076
4108
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
4077
4109
|
# the newest timestamp within the staleness bound that allows execution of the
|
4078
4110
|
# reads at the closest available replica without blocking. All rows yielded are
|
@@ -4089,15 +4121,15 @@ module Google
|
|
4089
4121
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
4090
4122
|
# it can only be used with single-use read-only transactions. See
|
4091
4123
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
4092
|
-
# min_read_timestamp.
|
4093
|
-
#
|
4094
|
-
#
|
4095
|
-
#
|
4096
|
-
#
|
4097
|
-
#
|
4124
|
+
# min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner
|
4125
|
+
# continuously garbage collects deleted and overwritten data in the background
|
4126
|
+
# to reclaim storage space. This process is known as "version GC". By default,
|
4127
|
+
# version GC reclaims versions after they are one hour old. Because of this,
|
4128
|
+
# Cloud Spanner cannot perform reads at read timestamps more than one hour in
|
4129
|
+
# the past. This restriction also applies to in-progress reads and/or SQL
|
4098
4130
|
# queries whose timestamp become too old while executing. Reads and SQL queries
|
4099
|
-
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4100
|
-
# Partitioned DML Transactions Partitioned DML transactions are used to execute
|
4131
|
+
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4132
|
+
# Partitioned DML Transactions: Partitioned DML transactions are used to execute
|
4101
4133
|
# DML statements with a different execution strategy that provides different,
|
4102
4134
|
# and often better, scalability properties for large, table-wide operations than
|
4103
4135
|
# DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP
|
@@ -4170,12 +4202,12 @@ module Google
|
|
4170
4202
|
class TransactionSelector
|
4171
4203
|
include Google::Apis::Core::Hashable
|
4172
4204
|
|
4173
|
-
#
|
4205
|
+
# Transactions: Each session can have at most one active transaction at a time (
|
4174
4206
|
# note that standalone reads and queries use a transaction internally and do
|
4175
4207
|
# count towards the one transaction limit). After the active transaction is
|
4176
4208
|
# completed, the session can immediately be re-used for the next transaction. It
|
4177
|
-
# is not necessary to create a new session for each transaction.
|
4178
|
-
# Modes Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4209
|
+
# is not necessary to create a new session for each transaction. Transaction
|
4210
|
+
# Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4179
4211
|
# This type of transaction is the only way to write data into Cloud Spanner.
|
4180
4212
|
# These transactions rely on pessimistic locking and, if necessary, two-phase
|
4181
4213
|
# commit. Locking read-write transactions may abort, requiring the application
|
@@ -4193,8 +4225,8 @@ module Google
|
|
4193
4225
|
# transactions. As a consequence of not taking locks, they also do not abort, so
|
4194
4226
|
# retry loops are not needed. Transactions may only read/write data in a single
|
4195
4227
|
# database. They may, however, read/write data in different tables within that
|
4196
|
-
# database.
|
4197
|
-
#
|
4228
|
+
# database. Locking Read-Write Transactions: Locking transactions may be used to
|
4229
|
+
# atomically read-modify-write data anywhere in a database. This type of
|
4198
4230
|
# transaction is externally consistent. Clients should attempt to minimize the
|
4199
4231
|
# amount of time a transaction is active. Faster transactions commit with higher
|
4200
4232
|
# probability and cause less contention. Cloud Spanner attempts to keep read
|
@@ -4203,7 +4235,7 @@ module Google
|
|
4203
4235
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
4204
4236
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
4205
4237
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
4206
|
-
# the client can send a Rollback request to abort the transaction.
|
4238
|
+
# the client can send a Rollback request to abort the transaction. Semantics:
|
4207
4239
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
4208
4240
|
# still valid at commit time, and it is able to acquire write locks for all
|
4209
4241
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -4211,24 +4243,24 @@ module Google
|
|
4211
4243
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
4212
4244
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
4213
4245
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
4214
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
4215
|
-
#
|
4216
|
-
#
|
4217
|
-
#
|
4218
|
-
#
|
4219
|
-
#
|
4220
|
-
#
|
4221
|
-
#
|
4222
|
-
#
|
4223
|
-
#
|
4224
|
-
#
|
4225
|
-
#
|
4226
|
-
#
|
4227
|
-
#
|
4228
|
-
#
|
4229
|
-
#
|
4230
|
-
#
|
4231
|
-
# becoming idle.
|
4246
|
+
# exclusion other than between Cloud Spanner transactions themselves. Retrying
|
4247
|
+
# Aborted Transactions: When a transaction aborts, the application can choose to
|
4248
|
+
# retry the whole transaction again. To maximize the chances of successfully
|
4249
|
+
# committing the retry, the client should execute the retry in the same session
|
4250
|
+
# as the original attempt. The original session's lock priority increases with
|
4251
|
+
# each consecutive abort, meaning that each attempt has a slightly better chance
|
4252
|
+
# of success than the previous. Under some circumstances (e.g., many
|
4253
|
+
# transactions attempting to modify the same row(s)), a transaction can abort
|
4254
|
+
# many times in a short period before successfully committing. Thus, it is not a
|
4255
|
+
# good idea to cap the number of retries a transaction can attempt; instead, it
|
4256
|
+
# is better to limit the total amount of wall time spent retrying. Idle
|
4257
|
+
# Transactions: A transaction is considered idle if it has no outstanding reads
|
4258
|
+
# or SQL queries and has not started a read or SQL query within the last 10
|
4259
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they don't
|
4260
|
+
# hold on to locks indefinitely. In that case, the commit will fail with error `
|
4261
|
+
# ABORTED`. If this behavior is undesirable, periodically executing a simple SQL
|
4262
|
+
# query in the transaction (e.g., `SELECT 1`) prevents the transaction from
|
4263
|
+
# becoming idle. Snapshot Read-Only Transactions: Snapshot read-only
|
4232
4264
|
# transactions provides a simpler method than locking read-write transactions
|
4233
4265
|
# for doing several consistent reads. However, this type of transaction does not
|
4234
4266
|
# support writes. Snapshot transactions do not take locks. Instead, they work by
|
@@ -4246,15 +4278,15 @@ module Google
|
|
4246
4278
|
# is geographically distributed, stale read-only transactions can execute more
|
4247
4279
|
# quickly than strong or read-write transaction, because they are able to
|
4248
4280
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
4249
|
-
# in detail below.
|
4250
|
-
#
|
4281
|
+
# in detail below. Strong: Strong reads are guaranteed to see the effects of all
|
4282
|
+
# transactions that have committed before the start of the read. Furthermore,
|
4251
4283
|
# all rows yielded by a single read are consistent with each other -- if any
|
4252
4284
|
# part of the read observes a transaction, all parts of the read see the
|
4253
4285
|
# transaction. Strong reads are not repeatable: two consecutive strong read-only
|
4254
4286
|
# transactions might return inconsistent results if there are concurrent writes.
|
4255
4287
|
# If consistency across reads is required, the reads should be executed within a
|
4256
4288
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
4257
|
-
# strong.
|
4289
|
+
# strong. Exact Staleness: These timestamp bounds execute reads at a user-
|
4258
4290
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
4259
4291
|
# prefix of the global transaction history: they observe modifications done by
|
4260
4292
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -4266,8 +4298,8 @@ module Google
|
|
4266
4298
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
4267
4299
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
4268
4300
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
4269
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
4270
|
-
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
4301
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded
|
4302
|
+
# Staleness: Bounded staleness modes allow Cloud Spanner to pick the read
|
4271
4303
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
4272
4304
|
# the newest timestamp within the staleness bound that allows execution of the
|
4273
4305
|
# reads at the closest available replica without blocking. All rows yielded are
|
@@ -4284,15 +4316,15 @@ module Google
|
|
4284
4316
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
4285
4317
|
# it can only be used with single-use read-only transactions. See
|
4286
4318
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
4287
|
-
# min_read_timestamp.
|
4288
|
-
#
|
4289
|
-
#
|
4290
|
-
#
|
4291
|
-
#
|
4292
|
-
#
|
4319
|
+
# min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner
|
4320
|
+
# continuously garbage collects deleted and overwritten data in the background
|
4321
|
+
# to reclaim storage space. This process is known as "version GC". By default,
|
4322
|
+
# version GC reclaims versions after they are one hour old. Because of this,
|
4323
|
+
# Cloud Spanner cannot perform reads at read timestamps more than one hour in
|
4324
|
+
# the past. This restriction also applies to in-progress reads and/or SQL
|
4293
4325
|
# queries whose timestamp become too old while executing. Reads and SQL queries
|
4294
|
-
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4295
|
-
# Partitioned DML Transactions Partitioned DML transactions are used to execute
|
4326
|
+
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4327
|
+
# Partitioned DML Transactions: Partitioned DML transactions are used to execute
|
4296
4328
|
# DML statements with a different execution strategy that provides different,
|
4297
4329
|
# and often better, scalability properties for large, table-wide operations than
|
4298
4330
|
# DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP
|
@@ -4339,12 +4371,12 @@ module Google
|
|
4339
4371
|
# @return [String]
|
4340
4372
|
attr_accessor :id
|
4341
4373
|
|
4342
|
-
#
|
4374
|
+
# Transactions: Each session can have at most one active transaction at a time (
|
4343
4375
|
# note that standalone reads and queries use a transaction internally and do
|
4344
4376
|
# count towards the one transaction limit). After the active transaction is
|
4345
4377
|
# completed, the session can immediately be re-used for the next transaction. It
|
4346
|
-
# is not necessary to create a new session for each transaction.
|
4347
|
-
# Modes Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4378
|
+
# is not necessary to create a new session for each transaction. Transaction
|
4379
|
+
# Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4348
4380
|
# This type of transaction is the only way to write data into Cloud Spanner.
|
4349
4381
|
# These transactions rely on pessimistic locking and, if necessary, two-phase
|
4350
4382
|
# commit. Locking read-write transactions may abort, requiring the application
|
@@ -4362,8 +4394,8 @@ module Google
|
|
4362
4394
|
# transactions. As a consequence of not taking locks, they also do not abort, so
|
4363
4395
|
# retry loops are not needed. Transactions may only read/write data in a single
|
4364
4396
|
# database. They may, however, read/write data in different tables within that
|
4365
|
-
# database.
|
4366
|
-
#
|
4397
|
+
# database. Locking Read-Write Transactions: Locking transactions may be used to
|
4398
|
+
# atomically read-modify-write data anywhere in a database. This type of
|
4367
4399
|
# transaction is externally consistent. Clients should attempt to minimize the
|
4368
4400
|
# amount of time a transaction is active. Faster transactions commit with higher
|
4369
4401
|
# probability and cause less contention. Cloud Spanner attempts to keep read
|
@@ -4372,7 +4404,7 @@ module Google
|
|
4372
4404
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
4373
4405
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
4374
4406
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
4375
|
-
# the client can send a Rollback request to abort the transaction.
|
4407
|
+
# the client can send a Rollback request to abort the transaction. Semantics:
|
4376
4408
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
4377
4409
|
# still valid at commit time, and it is able to acquire write locks for all
|
4378
4410
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -4380,24 +4412,24 @@ module Google
|
|
4380
4412
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
4381
4413
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
4382
4414
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
4383
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
4384
|
-
#
|
4385
|
-
#
|
4386
|
-
#
|
4387
|
-
#
|
4388
|
-
#
|
4389
|
-
#
|
4390
|
-
#
|
4391
|
-
#
|
4392
|
-
#
|
4393
|
-
#
|
4394
|
-
#
|
4395
|
-
#
|
4396
|
-
#
|
4397
|
-
#
|
4398
|
-
#
|
4399
|
-
#
|
4400
|
-
# becoming idle.
|
4415
|
+
# exclusion other than between Cloud Spanner transactions themselves. Retrying
|
4416
|
+
# Aborted Transactions: When a transaction aborts, the application can choose to
|
4417
|
+
# retry the whole transaction again. To maximize the chances of successfully
|
4418
|
+
# committing the retry, the client should execute the retry in the same session
|
4419
|
+
# as the original attempt. The original session's lock priority increases with
|
4420
|
+
# each consecutive abort, meaning that each attempt has a slightly better chance
|
4421
|
+
# of success than the previous. Under some circumstances (e.g., many
|
4422
|
+
# transactions attempting to modify the same row(s)), a transaction can abort
|
4423
|
+
# many times in a short period before successfully committing. Thus, it is not a
|
4424
|
+
# good idea to cap the number of retries a transaction can attempt; instead, it
|
4425
|
+
# is better to limit the total amount of wall time spent retrying. Idle
|
4426
|
+
# Transactions: A transaction is considered idle if it has no outstanding reads
|
4427
|
+
# or SQL queries and has not started a read or SQL query within the last 10
|
4428
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they don't
|
4429
|
+
# hold on to locks indefinitely. In that case, the commit will fail with error `
|
4430
|
+
# ABORTED`. If this behavior is undesirable, periodically executing a simple SQL
|
4431
|
+
# query in the transaction (e.g., `SELECT 1`) prevents the transaction from
|
4432
|
+
# becoming idle. Snapshot Read-Only Transactions: Snapshot read-only
|
4401
4433
|
# transactions provides a simpler method than locking read-write transactions
|
4402
4434
|
# for doing several consistent reads. However, this type of transaction does not
|
4403
4435
|
# support writes. Snapshot transactions do not take locks. Instead, they work by
|
@@ -4415,15 +4447,15 @@ module Google
|
|
4415
4447
|
# is geographically distributed, stale read-only transactions can execute more
|
4416
4448
|
# quickly than strong or read-write transaction, because they are able to
|
4417
4449
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
4418
|
-
# in detail below.
|
4419
|
-
#
|
4450
|
+
# in detail below. Strong: Strong reads are guaranteed to see the effects of all
|
4451
|
+
# transactions that have committed before the start of the read. Furthermore,
|
4420
4452
|
# all rows yielded by a single read are consistent with each other -- if any
|
4421
4453
|
# part of the read observes a transaction, all parts of the read see the
|
4422
4454
|
# transaction. Strong reads are not repeatable: two consecutive strong read-only
|
4423
4455
|
# transactions might return inconsistent results if there are concurrent writes.
|
4424
4456
|
# If consistency across reads is required, the reads should be executed within a
|
4425
4457
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
4426
|
-
# strong.
|
4458
|
+
# strong. Exact Staleness: These timestamp bounds execute reads at a user-
|
4427
4459
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
4428
4460
|
# prefix of the global transaction history: they observe modifications done by
|
4429
4461
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -4435,8 +4467,8 @@ module Google
|
|
4435
4467
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
4436
4468
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
4437
4469
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
4438
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
4439
|
-
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
4470
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded
|
4471
|
+
# Staleness: Bounded staleness modes allow Cloud Spanner to pick the read
|
4440
4472
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
4441
4473
|
# the newest timestamp within the staleness bound that allows execution of the
|
4442
4474
|
# reads at the closest available replica without blocking. All rows yielded are
|
@@ -4453,15 +4485,15 @@ module Google
|
|
4453
4485
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
4454
4486
|
# it can only be used with single-use read-only transactions. See
|
4455
4487
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
4456
|
-
# min_read_timestamp.
|
4457
|
-
#
|
4458
|
-
#
|
4459
|
-
#
|
4460
|
-
#
|
4461
|
-
#
|
4488
|
+
# min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner
|
4489
|
+
# continuously garbage collects deleted and overwritten data in the background
|
4490
|
+
# to reclaim storage space. This process is known as "version GC". By default,
|
4491
|
+
# version GC reclaims versions after they are one hour old. Because of this,
|
4492
|
+
# Cloud Spanner cannot perform reads at read timestamps more than one hour in
|
4493
|
+
# the past. This restriction also applies to in-progress reads and/or SQL
|
4462
4494
|
# queries whose timestamp become too old while executing. Reads and SQL queries
|
4463
|
-
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4464
|
-
# Partitioned DML Transactions Partitioned DML transactions are used to execute
|
4495
|
+
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4496
|
+
# Partitioned DML Transactions: Partitioned DML transactions are used to execute
|
4465
4497
|
# DML statements with a different execution strategy that provides different,
|
4466
4498
|
# and often better, scalability properties for large, table-wide operations than
|
4467
4499
|
# DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module SpannerV1
|
18
18
|
# Version of the google-apis-spanner_v1 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.15.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.4.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20210703"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -807,6 +807,7 @@ module Google
|
|
807
807
|
# @private
|
808
808
|
class Representation < Google::Apis::Core::JsonRepresentation
|
809
809
|
property :create_time, as: 'createTime'
|
810
|
+
property :default_leader, as: 'defaultLeader'
|
810
811
|
property :earliest_version_time, as: 'earliestVersionTime'
|
811
812
|
property :encryption_config, as: 'encryptionConfig', class: Google::Apis::SpannerV1::EncryptionConfig, decorator: Google::Apis::SpannerV1::EncryptionConfig::Representation
|
812
813
|
|
@@ -984,6 +985,7 @@ module Google
|
|
984
985
|
hash :labels, as: 'labels'
|
985
986
|
property :name, as: 'name'
|
986
987
|
property :node_count, as: 'nodeCount'
|
988
|
+
property :processing_units, as: 'processingUnits'
|
987
989
|
property :state, as: 'state'
|
988
990
|
end
|
989
991
|
end
|
@@ -992,6 +994,7 @@ module Google
|
|
992
994
|
# @private
|
993
995
|
class Representation < Google::Apis::Core::JsonRepresentation
|
994
996
|
property :display_name, as: 'displayName'
|
997
|
+
collection :leader_options, as: 'leaderOptions'
|
995
998
|
property :name, as: 'name'
|
996
999
|
collection :replicas, as: 'replicas', class: Google::Apis::SpannerV1::ReplicaInfo, decorator: Google::Apis::SpannerV1::ReplicaInfo::Representation
|
997
1000
|
|
@@ -1020,6 +1023,7 @@ module Google
|
|
1020
1023
|
property :metric, as: 'metric', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
|
1021
1024
|
|
1022
1025
|
property :start_key_index, as: 'startKeyIndex'
|
1026
|
+
property :time_offset, as: 'timeOffset'
|
1023
1027
|
property :unit, as: 'unit', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
|
1024
1028
|
|
1025
1029
|
property :value, as: 'value'
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-spanner_v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.4'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.4'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
description: This is the simple REST client for Cloud Spanner API V1. Simple REST
|
28
34
|
clients are Ruby client libraries that provide access to Google services via their
|
29
35
|
HTTP REST API endpoints. These libraries are generated and updated automatically
|
@@ -52,7 +58,7 @@ licenses:
|
|
52
58
|
metadata:
|
53
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
54
60
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-spanner_v1/CHANGELOG.md
|
55
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-spanner_v1/v0.15.0
|
56
62
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-spanner_v1
|
57
63
|
post_install_message:
|
58
64
|
rdoc_options: []
|