google-apis-spanner_v1 0.12.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/google/apis/spanner_v1/classes.rb +219 -192
- data/lib/google/apis/spanner_v1/gem_version.rb +3 -3
- data/lib/google/apis/spanner_v1/representations.rb +3 -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: 6fbddcaa4658b3147d2258f83f732fdc5679b6d762e0c0aeeb120e6ad5f3726e
|
4
|
+
data.tar.gz: 3cd473218d291908672f0095738a11a7cd0ded8e15bc23edf465769340a9e710
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22f24dbab2d23ac55ee2af9bf16a2f5e08ca79ce262a0d4debeddad921c6a7d9df01b621af41b15257761762e3e19eddc0be9844d002db75387761773099956d
|
7
|
+
data.tar.gz: 1c44606e7033bfb89ffa6651054412a552e4f05e3b4a66138135a19b32fc6c2d9149bc3ac519ca0b010607616fa08c88198774f96d9d9a31fd61f07a210fee60
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# Release history for google-apis-spanner_v1
|
2
2
|
|
3
|
+
### v0.16.0 (2021-07-31)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20210723
|
6
|
+
|
7
|
+
### v0.15.0 (2021-07-12)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20210703
|
10
|
+
|
11
|
+
### v0.14.0 (2021-07-03)
|
12
|
+
|
13
|
+
* Regenerated from discovery document revision 20210624
|
14
|
+
* Regenerated using generator version 0.4.0
|
15
|
+
* Unspecified changes
|
16
|
+
|
17
|
+
### v0.13.0 (2021-06-17)
|
18
|
+
|
19
|
+
* Regenerated from discovery document revision 20210611
|
20
|
+
|
3
21
|
### v0.12.0 (2021-06-10)
|
4
22
|
|
5
23
|
* Regenerated from discovery document revision 20210603
|
@@ -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)
|
@@ -1664,17 +1673,20 @@ module Google
|
|
1664
1673
|
# @return [String]
|
1665
1674
|
attr_accessor :name
|
1666
1675
|
|
1667
|
-
# The number of nodes allocated to this instance.
|
1668
|
-
#
|
1669
|
-
#
|
1670
|
-
#
|
1676
|
+
# The number of nodes allocated to this instance. At most one of either
|
1677
|
+
# node_count or processing_units should be present in the message. This may be
|
1678
|
+
# zero in API responses for instances that are not yet in state `READY`. See [
|
1679
|
+
# the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for
|
1680
|
+
# more information about nodes and processing units.
|
1671
1681
|
# Corresponds to the JSON property `nodeCount`
|
1672
1682
|
# @return [Fixnum]
|
1673
1683
|
attr_accessor :node_count
|
1674
1684
|
|
1675
1685
|
# The number of processing units allocated to this instance. At most one of
|
1676
1686
|
# processing_units or node_count should be present in the message. This may be
|
1677
|
-
# zero in API responses for instances that are not yet in state `READY`.
|
1687
|
+
# zero in API responses for instances that are not yet in state `READY`. See [
|
1688
|
+
# the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for
|
1689
|
+
# more information about nodes and processing units.
|
1678
1690
|
# Corresponds to the JSON property `processingUnits`
|
1679
1691
|
# @return [Fixnum]
|
1680
1692
|
attr_accessor :processing_units
|
@@ -1713,6 +1725,12 @@ module Google
|
|
1713
1725
|
# @return [String]
|
1714
1726
|
attr_accessor :display_name
|
1715
1727
|
|
1728
|
+
# Allowed values of the “default_leader” schema option for databases in
|
1729
|
+
# instances that use this instance configuration.
|
1730
|
+
# Corresponds to the JSON property `leaderOptions`
|
1731
|
+
# @return [Array<String>]
|
1732
|
+
attr_accessor :leader_options
|
1733
|
+
|
1716
1734
|
# A unique identifier for the instance configuration. Values are of the form `
|
1717
1735
|
# projects//instanceConfigs/a-z*`
|
1718
1736
|
# Corresponds to the JSON property `name`
|
@@ -1732,6 +1750,7 @@ module Google
|
|
1732
1750
|
# Update properties of this object
|
1733
1751
|
def update!(**args)
|
1734
1752
|
@display_name = args[:display_name] if args.key?(:display_name)
|
1753
|
+
@leader_options = args[:leader_options] if args.key?(:leader_options)
|
1735
1754
|
@name = args[:name] if args.key?(:name)
|
1736
1755
|
@replicas = args[:replicas] if args.key?(:replicas)
|
1737
1756
|
end
|
@@ -1847,6 +1866,11 @@ module Google
|
|
1847
1866
|
# @return [Fixnum]
|
1848
1867
|
attr_accessor :start_key_index
|
1849
1868
|
|
1869
|
+
# The time offset. This is the time since the start of the time interval.
|
1870
|
+
# Corresponds to the JSON property `timeOffset`
|
1871
|
+
# @return [String]
|
1872
|
+
attr_accessor :time_offset
|
1873
|
+
|
1850
1874
|
# A message representing a user-facing string whose value may need to be
|
1851
1875
|
# translated before being displayed.
|
1852
1876
|
# Corresponds to the JSON property `unit`
|
@@ -1870,6 +1894,7 @@ module Google
|
|
1870
1894
|
@keys_count = args[:keys_count] if args.key?(:keys_count)
|
1871
1895
|
@metric = args[:metric] if args.key?(:metric)
|
1872
1896
|
@start_key_index = args[:start_key_index] if args.key?(:start_key_index)
|
1897
|
+
@time_offset = args[:time_offset] if args.key?(:time_offset)
|
1873
1898
|
@unit = args[:unit] if args.key?(:unit)
|
1874
1899
|
@value = args[:value] if args.key?(:value)
|
1875
1900
|
end
|
@@ -3313,7 +3338,8 @@ module Google
|
|
3313
3338
|
# requests where it's not applicable (e.g. CommitRequest). Legal characters for `
|
3314
3339
|
# request_tag` values are all printable characters (ASCII 32 - 126) and the
|
3315
3340
|
# length of a request_tag is limited to 50 characters. Values that exceed this
|
3316
|
-
# limit are truncated.
|
3341
|
+
# limit are truncated. Any leading underscore (_) characters will be removed
|
3342
|
+
# from the string.
|
3317
3343
|
# Corresponds to the JSON property `requestTag`
|
3318
3344
|
# @return [String]
|
3319
3345
|
attr_accessor :request_tag
|
@@ -3325,7 +3351,8 @@ module Google
|
|
3325
3351
|
# transaction, transaction_tag will be ignored. Legal characters for `
|
3326
3352
|
# transaction_tag` values are all printable characters (ASCII 32 - 126) and the
|
3327
3353
|
# length of a transaction_tag is limited to 50 characters. Values that exceed
|
3328
|
-
# this limit are truncated.
|
3354
|
+
# this limit are truncated. Any leading underscore (_) characters will be
|
3355
|
+
# removed from the string.
|
3329
3356
|
# Corresponds to the JSON property `transactionTag`
|
3330
3357
|
# @return [String]
|
3331
3358
|
attr_accessor :transaction_tag
|
@@ -3983,12 +4010,12 @@ module Google
|
|
3983
4010
|
end
|
3984
4011
|
end
|
3985
4012
|
|
3986
|
-
#
|
4013
|
+
# Transactions: Each session can have at most one active transaction at a time (
|
3987
4014
|
# note that standalone reads and queries use a transaction internally and do
|
3988
4015
|
# count towards the one transaction limit). After the active transaction is
|
3989
4016
|
# completed, the session can immediately be re-used for the next transaction. It
|
3990
|
-
# is not necessary to create a new session for each transaction.
|
3991
|
-
# Modes Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4017
|
+
# is not necessary to create a new session for each transaction. Transaction
|
4018
|
+
# Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
3992
4019
|
# This type of transaction is the only way to write data into Cloud Spanner.
|
3993
4020
|
# These transactions rely on pessimistic locking and, if necessary, two-phase
|
3994
4021
|
# commit. Locking read-write transactions may abort, requiring the application
|
@@ -4006,8 +4033,8 @@ module Google
|
|
4006
4033
|
# transactions. As a consequence of not taking locks, they also do not abort, so
|
4007
4034
|
# retry loops are not needed. Transactions may only read/write data in a single
|
4008
4035
|
# database. They may, however, read/write data in different tables within that
|
4009
|
-
# database.
|
4010
|
-
#
|
4036
|
+
# database. Locking Read-Write Transactions: Locking transactions may be used to
|
4037
|
+
# atomically read-modify-write data anywhere in a database. This type of
|
4011
4038
|
# transaction is externally consistent. Clients should attempt to minimize the
|
4012
4039
|
# amount of time a transaction is active. Faster transactions commit with higher
|
4013
4040
|
# probability and cause less contention. Cloud Spanner attempts to keep read
|
@@ -4016,7 +4043,7 @@ module Google
|
|
4016
4043
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
4017
4044
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
4018
4045
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
4019
|
-
# the client can send a Rollback request to abort the transaction.
|
4046
|
+
# the client can send a Rollback request to abort the transaction. Semantics:
|
4020
4047
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
4021
4048
|
# still valid at commit time, and it is able to acquire write locks for all
|
4022
4049
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -4024,24 +4051,24 @@ module Google
|
|
4024
4051
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
4025
4052
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
4026
4053
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
4027
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
4028
|
-
#
|
4029
|
-
#
|
4030
|
-
#
|
4031
|
-
#
|
4032
|
-
#
|
4033
|
-
#
|
4034
|
-
#
|
4035
|
-
#
|
4036
|
-
#
|
4037
|
-
#
|
4038
|
-
#
|
4039
|
-
#
|
4040
|
-
#
|
4041
|
-
#
|
4042
|
-
#
|
4043
|
-
#
|
4044
|
-
# becoming idle.
|
4054
|
+
# exclusion other than between Cloud Spanner transactions themselves. Retrying
|
4055
|
+
# Aborted Transactions: When a transaction aborts, the application can choose to
|
4056
|
+
# retry the whole transaction again. To maximize the chances of successfully
|
4057
|
+
# committing the retry, the client should execute the retry in the same session
|
4058
|
+
# as the original attempt. The original session's lock priority increases with
|
4059
|
+
# each consecutive abort, meaning that each attempt has a slightly better chance
|
4060
|
+
# of success than the previous. Under some circumstances (e.g., many
|
4061
|
+
# transactions attempting to modify the same row(s)), a transaction can abort
|
4062
|
+
# many times in a short period before successfully committing. Thus, it is not a
|
4063
|
+
# good idea to cap the number of retries a transaction can attempt; instead, it
|
4064
|
+
# is better to limit the total amount of wall time spent retrying. Idle
|
4065
|
+
# Transactions: A transaction is considered idle if it has no outstanding reads
|
4066
|
+
# or SQL queries and has not started a read or SQL query within the last 10
|
4067
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they don't
|
4068
|
+
# hold on to locks indefinitely. In that case, the commit will fail with error `
|
4069
|
+
# ABORTED`. If this behavior is undesirable, periodically executing a simple SQL
|
4070
|
+
# query in the transaction (e.g., `SELECT 1`) prevents the transaction from
|
4071
|
+
# becoming idle. Snapshot Read-Only Transactions: Snapshot read-only
|
4045
4072
|
# transactions provides a simpler method than locking read-write transactions
|
4046
4073
|
# for doing several consistent reads. However, this type of transaction does not
|
4047
4074
|
# support writes. Snapshot transactions do not take locks. Instead, they work by
|
@@ -4059,15 +4086,15 @@ module Google
|
|
4059
4086
|
# is geographically distributed, stale read-only transactions can execute more
|
4060
4087
|
# quickly than strong or read-write transaction, because they are able to
|
4061
4088
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
4062
|
-
# in detail below.
|
4063
|
-
#
|
4089
|
+
# in detail below. Strong: Strong reads are guaranteed to see the effects of all
|
4090
|
+
# transactions that have committed before the start of the read. Furthermore,
|
4064
4091
|
# all rows yielded by a single read are consistent with each other -- if any
|
4065
4092
|
# part of the read observes a transaction, all parts of the read see the
|
4066
4093
|
# transaction. Strong reads are not repeatable: two consecutive strong read-only
|
4067
4094
|
# transactions might return inconsistent results if there are concurrent writes.
|
4068
4095
|
# If consistency across reads is required, the reads should be executed within a
|
4069
4096
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
4070
|
-
# strong.
|
4097
|
+
# strong. Exact Staleness: These timestamp bounds execute reads at a user-
|
4071
4098
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
4072
4099
|
# prefix of the global transaction history: they observe modifications done by
|
4073
4100
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -4079,8 +4106,8 @@ module Google
|
|
4079
4106
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
4080
4107
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
4081
4108
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
4082
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
4083
|
-
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
4109
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded
|
4110
|
+
# Staleness: Bounded staleness modes allow Cloud Spanner to pick the read
|
4084
4111
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
4085
4112
|
# the newest timestamp within the staleness bound that allows execution of the
|
4086
4113
|
# reads at the closest available replica without blocking. All rows yielded are
|
@@ -4097,15 +4124,15 @@ module Google
|
|
4097
4124
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
4098
4125
|
# it can only be used with single-use read-only transactions. See
|
4099
4126
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
4100
|
-
# min_read_timestamp.
|
4101
|
-
#
|
4102
|
-
#
|
4103
|
-
#
|
4104
|
-
#
|
4105
|
-
#
|
4127
|
+
# min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner
|
4128
|
+
# continuously garbage collects deleted and overwritten data in the background
|
4129
|
+
# to reclaim storage space. This process is known as "version GC". By default,
|
4130
|
+
# version GC reclaims versions after they are one hour old. Because of this,
|
4131
|
+
# Cloud Spanner cannot perform reads at read timestamps more than one hour in
|
4132
|
+
# the past. This restriction also applies to in-progress reads and/or SQL
|
4106
4133
|
# queries whose timestamp become too old while executing. Reads and SQL queries
|
4107
|
-
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4108
|
-
# Partitioned DML Transactions Partitioned DML transactions are used to execute
|
4134
|
+
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4135
|
+
# Partitioned DML Transactions: Partitioned DML transactions are used to execute
|
4109
4136
|
# DML statements with a different execution strategy that provides different,
|
4110
4137
|
# and often better, scalability properties for large, table-wide operations than
|
4111
4138
|
# DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP
|
@@ -4178,12 +4205,12 @@ module Google
|
|
4178
4205
|
class TransactionSelector
|
4179
4206
|
include Google::Apis::Core::Hashable
|
4180
4207
|
|
4181
|
-
#
|
4208
|
+
# Transactions: Each session can have at most one active transaction at a time (
|
4182
4209
|
# note that standalone reads and queries use a transaction internally and do
|
4183
4210
|
# count towards the one transaction limit). After the active transaction is
|
4184
4211
|
# completed, the session can immediately be re-used for the next transaction. It
|
4185
|
-
# is not necessary to create a new session for each transaction.
|
4186
|
-
# Modes Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4212
|
+
# is not necessary to create a new session for each transaction. Transaction
|
4213
|
+
# Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4187
4214
|
# This type of transaction is the only way to write data into Cloud Spanner.
|
4188
4215
|
# These transactions rely on pessimistic locking and, if necessary, two-phase
|
4189
4216
|
# commit. Locking read-write transactions may abort, requiring the application
|
@@ -4201,8 +4228,8 @@ module Google
|
|
4201
4228
|
# transactions. As a consequence of not taking locks, they also do not abort, so
|
4202
4229
|
# retry loops are not needed. Transactions may only read/write data in a single
|
4203
4230
|
# database. They may, however, read/write data in different tables within that
|
4204
|
-
# database.
|
4205
|
-
#
|
4231
|
+
# database. Locking Read-Write Transactions: Locking transactions may be used to
|
4232
|
+
# atomically read-modify-write data anywhere in a database. This type of
|
4206
4233
|
# transaction is externally consistent. Clients should attempt to minimize the
|
4207
4234
|
# amount of time a transaction is active. Faster transactions commit with higher
|
4208
4235
|
# probability and cause less contention. Cloud Spanner attempts to keep read
|
@@ -4211,7 +4238,7 @@ module Google
|
|
4211
4238
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
4212
4239
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
4213
4240
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
4214
|
-
# the client can send a Rollback request to abort the transaction.
|
4241
|
+
# the client can send a Rollback request to abort the transaction. Semantics:
|
4215
4242
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
4216
4243
|
# still valid at commit time, and it is able to acquire write locks for all
|
4217
4244
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -4219,24 +4246,24 @@ module Google
|
|
4219
4246
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
4220
4247
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
4221
4248
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
4222
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
4223
|
-
#
|
4224
|
-
#
|
4225
|
-
#
|
4226
|
-
#
|
4227
|
-
#
|
4228
|
-
#
|
4229
|
-
#
|
4230
|
-
#
|
4231
|
-
#
|
4232
|
-
#
|
4233
|
-
#
|
4234
|
-
#
|
4235
|
-
#
|
4236
|
-
#
|
4237
|
-
#
|
4238
|
-
#
|
4239
|
-
# becoming idle.
|
4249
|
+
# exclusion other than between Cloud Spanner transactions themselves. Retrying
|
4250
|
+
# Aborted Transactions: When a transaction aborts, the application can choose to
|
4251
|
+
# retry the whole transaction again. To maximize the chances of successfully
|
4252
|
+
# committing the retry, the client should execute the retry in the same session
|
4253
|
+
# as the original attempt. The original session's lock priority increases with
|
4254
|
+
# each consecutive abort, meaning that each attempt has a slightly better chance
|
4255
|
+
# of success than the previous. Under some circumstances (e.g., many
|
4256
|
+
# transactions attempting to modify the same row(s)), a transaction can abort
|
4257
|
+
# many times in a short period before successfully committing. Thus, it is not a
|
4258
|
+
# good idea to cap the number of retries a transaction can attempt; instead, it
|
4259
|
+
# is better to limit the total amount of wall time spent retrying. Idle
|
4260
|
+
# Transactions: A transaction is considered idle if it has no outstanding reads
|
4261
|
+
# or SQL queries and has not started a read or SQL query within the last 10
|
4262
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they don't
|
4263
|
+
# hold on to locks indefinitely. In that case, the commit will fail with error `
|
4264
|
+
# ABORTED`. If this behavior is undesirable, periodically executing a simple SQL
|
4265
|
+
# query in the transaction (e.g., `SELECT 1`) prevents the transaction from
|
4266
|
+
# becoming idle. Snapshot Read-Only Transactions: Snapshot read-only
|
4240
4267
|
# transactions provides a simpler method than locking read-write transactions
|
4241
4268
|
# for doing several consistent reads. However, this type of transaction does not
|
4242
4269
|
# support writes. Snapshot transactions do not take locks. Instead, they work by
|
@@ -4254,15 +4281,15 @@ module Google
|
|
4254
4281
|
# is geographically distributed, stale read-only transactions can execute more
|
4255
4282
|
# quickly than strong or read-write transaction, because they are able to
|
4256
4283
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
4257
|
-
# in detail below.
|
4258
|
-
#
|
4284
|
+
# in detail below. Strong: Strong reads are guaranteed to see the effects of all
|
4285
|
+
# transactions that have committed before the start of the read. Furthermore,
|
4259
4286
|
# all rows yielded by a single read are consistent with each other -- if any
|
4260
4287
|
# part of the read observes a transaction, all parts of the read see the
|
4261
4288
|
# transaction. Strong reads are not repeatable: two consecutive strong read-only
|
4262
4289
|
# transactions might return inconsistent results if there are concurrent writes.
|
4263
4290
|
# If consistency across reads is required, the reads should be executed within a
|
4264
4291
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
4265
|
-
# strong.
|
4292
|
+
# strong. Exact Staleness: These timestamp bounds execute reads at a user-
|
4266
4293
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
4267
4294
|
# prefix of the global transaction history: they observe modifications done by
|
4268
4295
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -4274,8 +4301,8 @@ module Google
|
|
4274
4301
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
4275
4302
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
4276
4303
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
4277
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
4278
|
-
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
4304
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded
|
4305
|
+
# Staleness: Bounded staleness modes allow Cloud Spanner to pick the read
|
4279
4306
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
4280
4307
|
# the newest timestamp within the staleness bound that allows execution of the
|
4281
4308
|
# reads at the closest available replica without blocking. All rows yielded are
|
@@ -4292,15 +4319,15 @@ module Google
|
|
4292
4319
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
4293
4320
|
# it can only be used with single-use read-only transactions. See
|
4294
4321
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
4295
|
-
# min_read_timestamp.
|
4296
|
-
#
|
4297
|
-
#
|
4298
|
-
#
|
4299
|
-
#
|
4300
|
-
#
|
4322
|
+
# min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner
|
4323
|
+
# continuously garbage collects deleted and overwritten data in the background
|
4324
|
+
# to reclaim storage space. This process is known as "version GC". By default,
|
4325
|
+
# version GC reclaims versions after they are one hour old. Because of this,
|
4326
|
+
# Cloud Spanner cannot perform reads at read timestamps more than one hour in
|
4327
|
+
# the past. This restriction also applies to in-progress reads and/or SQL
|
4301
4328
|
# queries whose timestamp become too old while executing. Reads and SQL queries
|
4302
|
-
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4303
|
-
# Partitioned DML Transactions Partitioned DML transactions are used to execute
|
4329
|
+
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4330
|
+
# Partitioned DML Transactions: Partitioned DML transactions are used to execute
|
4304
4331
|
# DML statements with a different execution strategy that provides different,
|
4305
4332
|
# and often better, scalability properties for large, table-wide operations than
|
4306
4333
|
# DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP
|
@@ -4347,12 +4374,12 @@ module Google
|
|
4347
4374
|
# @return [String]
|
4348
4375
|
attr_accessor :id
|
4349
4376
|
|
4350
|
-
#
|
4377
|
+
# Transactions: Each session can have at most one active transaction at a time (
|
4351
4378
|
# note that standalone reads and queries use a transaction internally and do
|
4352
4379
|
# count towards the one transaction limit). After the active transaction is
|
4353
4380
|
# completed, the session can immediately be re-used for the next transaction. It
|
4354
|
-
# is not necessary to create a new session for each transaction.
|
4355
|
-
# Modes Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4381
|
+
# is not necessary to create a new session for each transaction. Transaction
|
4382
|
+
# Modes: Cloud Spanner supports three transaction modes: 1. Locking read-write.
|
4356
4383
|
# This type of transaction is the only way to write data into Cloud Spanner.
|
4357
4384
|
# These transactions rely on pessimistic locking and, if necessary, two-phase
|
4358
4385
|
# commit. Locking read-write transactions may abort, requiring the application
|
@@ -4370,8 +4397,8 @@ module Google
|
|
4370
4397
|
# transactions. As a consequence of not taking locks, they also do not abort, so
|
4371
4398
|
# retry loops are not needed. Transactions may only read/write data in a single
|
4372
4399
|
# database. They may, however, read/write data in different tables within that
|
4373
|
-
# database.
|
4374
|
-
#
|
4400
|
+
# database. Locking Read-Write Transactions: Locking transactions may be used to
|
4401
|
+
# atomically read-modify-write data anywhere in a database. This type of
|
4375
4402
|
# transaction is externally consistent. Clients should attempt to minimize the
|
4376
4403
|
# amount of time a transaction is active. Faster transactions commit with higher
|
4377
4404
|
# probability and cause less contention. Cloud Spanner attempts to keep read
|
@@ -4380,7 +4407,7 @@ module Google
|
|
4380
4407
|
# inactivity at the client may cause Cloud Spanner to release a transaction's
|
4381
4408
|
# locks and abort it. Conceptually, a read-write transaction consists of zero or
|
4382
4409
|
# more reads or SQL statements followed by Commit. At any time before Commit,
|
4383
|
-
# the client can send a Rollback request to abort the transaction.
|
4410
|
+
# the client can send a Rollback request to abort the transaction. Semantics:
|
4384
4411
|
# Cloud Spanner can commit the transaction if all read locks it acquired are
|
4385
4412
|
# still valid at commit time, and it is able to acquire write locks for all
|
4386
4413
|
# writes. Cloud Spanner can abort the transaction for any reason. If a commit
|
@@ -4388,24 +4415,24 @@ module Google
|
|
4388
4415
|
# not modified any user data in Cloud Spanner. Unless the transaction commits,
|
4389
4416
|
# Cloud Spanner makes no guarantees about how long the transaction's locks were
|
4390
4417
|
# held for. It is an error to use Cloud Spanner locks for any sort of mutual
|
4391
|
-
# exclusion other than between Cloud Spanner transactions themselves.
|
4392
|
-
#
|
4393
|
-
#
|
4394
|
-
#
|
4395
|
-
#
|
4396
|
-
#
|
4397
|
-
#
|
4398
|
-
#
|
4399
|
-
#
|
4400
|
-
#
|
4401
|
-
#
|
4402
|
-
#
|
4403
|
-
#
|
4404
|
-
#
|
4405
|
-
#
|
4406
|
-
#
|
4407
|
-
#
|
4408
|
-
# becoming idle.
|
4418
|
+
# exclusion other than between Cloud Spanner transactions themselves. Retrying
|
4419
|
+
# Aborted Transactions: When a transaction aborts, the application can choose to
|
4420
|
+
# retry the whole transaction again. To maximize the chances of successfully
|
4421
|
+
# committing the retry, the client should execute the retry in the same session
|
4422
|
+
# as the original attempt. The original session's lock priority increases with
|
4423
|
+
# each consecutive abort, meaning that each attempt has a slightly better chance
|
4424
|
+
# of success than the previous. Under some circumstances (e.g., many
|
4425
|
+
# transactions attempting to modify the same row(s)), a transaction can abort
|
4426
|
+
# many times in a short period before successfully committing. Thus, it is not a
|
4427
|
+
# good idea to cap the number of retries a transaction can attempt; instead, it
|
4428
|
+
# is better to limit the total amount of wall time spent retrying. Idle
|
4429
|
+
# Transactions: A transaction is considered idle if it has no outstanding reads
|
4430
|
+
# or SQL queries and has not started a read or SQL query within the last 10
|
4431
|
+
# seconds. Idle transactions can be aborted by Cloud Spanner so that they don't
|
4432
|
+
# hold on to locks indefinitely. In that case, the commit will fail with error `
|
4433
|
+
# ABORTED`. If this behavior is undesirable, periodically executing a simple SQL
|
4434
|
+
# query in the transaction (e.g., `SELECT 1`) prevents the transaction from
|
4435
|
+
# becoming idle. Snapshot Read-Only Transactions: Snapshot read-only
|
4409
4436
|
# transactions provides a simpler method than locking read-write transactions
|
4410
4437
|
# for doing several consistent reads. However, this type of transaction does not
|
4411
4438
|
# support writes. Snapshot transactions do not take locks. Instead, they work by
|
@@ -4423,15 +4450,15 @@ module Google
|
|
4423
4450
|
# is geographically distributed, stale read-only transactions can execute more
|
4424
4451
|
# quickly than strong or read-write transaction, because they are able to
|
4425
4452
|
# execute far from the leader replica. Each type of timestamp bound is discussed
|
4426
|
-
# in detail below.
|
4427
|
-
#
|
4453
|
+
# in detail below. Strong: Strong reads are guaranteed to see the effects of all
|
4454
|
+
# transactions that have committed before the start of the read. Furthermore,
|
4428
4455
|
# all rows yielded by a single read are consistent with each other -- if any
|
4429
4456
|
# part of the read observes a transaction, all parts of the read see the
|
4430
4457
|
# transaction. Strong reads are not repeatable: two consecutive strong read-only
|
4431
4458
|
# transactions might return inconsistent results if there are concurrent writes.
|
4432
4459
|
# If consistency across reads is required, the reads should be executed within a
|
4433
4460
|
# transaction or at an exact read timestamp. See TransactionOptions.ReadOnly.
|
4434
|
-
# strong.
|
4461
|
+
# strong. Exact Staleness: These timestamp bounds execute reads at a user-
|
4435
4462
|
# specified timestamp. Reads at a timestamp are guaranteed to see a consistent
|
4436
4463
|
# prefix of the global transaction history: they observe modifications done by
|
4437
4464
|
# all transactions with a commit timestamp <= the read timestamp, and observe
|
@@ -4443,8 +4470,8 @@ module Google
|
|
4443
4470
|
# to pick a timestamp. As a result, they execute slightly faster than the
|
4444
4471
|
# equivalent boundedly stale concurrency modes. On the other hand, boundedly
|
4445
4472
|
# stale reads usually return fresher results. See TransactionOptions.ReadOnly.
|
4446
|
-
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness.
|
4447
|
-
# Staleness Bounded staleness modes allow Cloud Spanner to pick the read
|
4473
|
+
# read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded
|
4474
|
+
# Staleness: Bounded staleness modes allow Cloud Spanner to pick the read
|
4448
4475
|
# timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses
|
4449
4476
|
# the newest timestamp within the staleness bound that allows execution of the
|
4450
4477
|
# reads at the closest available replica without blocking. All rows yielded are
|
@@ -4461,15 +4488,15 @@ module Google
|
|
4461
4488
|
# timestamp negotiation requires up-front knowledge of which rows will be read,
|
4462
4489
|
# it can only be used with single-use read-only transactions. See
|
4463
4490
|
# TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.
|
4464
|
-
# min_read_timestamp.
|
4465
|
-
#
|
4466
|
-
#
|
4467
|
-
#
|
4468
|
-
#
|
4469
|
-
#
|
4491
|
+
# min_read_timestamp. Old Read Timestamps and Garbage Collection: Cloud Spanner
|
4492
|
+
# continuously garbage collects deleted and overwritten data in the background
|
4493
|
+
# to reclaim storage space. This process is known as "version GC". By default,
|
4494
|
+
# version GC reclaims versions after they are one hour old. Because of this,
|
4495
|
+
# Cloud Spanner cannot perform reads at read timestamps more than one hour in
|
4496
|
+
# the past. This restriction also applies to in-progress reads and/or SQL
|
4470
4497
|
# queries whose timestamp become too old while executing. Reads and SQL queries
|
4471
|
-
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4472
|
-
# Partitioned DML Transactions Partitioned DML transactions are used to execute
|
4498
|
+
# with too-old read timestamps fail with the error `FAILED_PRECONDITION`.
|
4499
|
+
# Partitioned DML Transactions: Partitioned DML transactions are used to execute
|
4473
4500
|
# DML statements with a different execution strategy that provides different,
|
4474
4501
|
# and often better, scalability properties for large, table-wide operations than
|
4475
4502
|
# 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.16.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 = "20210723"
|
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
|
|
@@ -993,6 +994,7 @@ module Google
|
|
993
994
|
# @private
|
994
995
|
class Representation < Google::Apis::Core::JsonRepresentation
|
995
996
|
property :display_name, as: 'displayName'
|
997
|
+
collection :leader_options, as: 'leaderOptions'
|
996
998
|
property :name, as: 'name'
|
997
999
|
collection :replicas, as: 'replicas', class: Google::Apis::SpannerV1::ReplicaInfo, decorator: Google::Apis::SpannerV1::ReplicaInfo::Representation
|
998
1000
|
|
@@ -1021,6 +1023,7 @@ module Google
|
|
1021
1023
|
property :metric, as: 'metric', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
|
1022
1024
|
|
1023
1025
|
property :start_key_index, as: 'startKeyIndex'
|
1026
|
+
property :time_offset, as: 'timeOffset'
|
1024
1027
|
property :unit, as: 'unit', class: Google::Apis::SpannerV1::LocalizedString, decorator: Google::Apis::SpannerV1::LocalizedString::Representation
|
1025
1028
|
|
1026
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.16.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-08-02 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.16.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: []
|