@google-cloud/spanner 8.0.0 → 8.1.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.
Files changed (50) hide show
  1. package/README.md +2 -0
  2. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +35 -0
  3. package/build/protos/google/spanner/v1/change_stream.proto +451 -0
  4. package/build/protos/google/spanner/v1/commit_response.proto +9 -4
  5. package/build/protos/google/spanner/v1/transaction.proto +40 -356
  6. package/build/protos/protos.d.ts +1521 -0
  7. package/build/protos/protos.js +3906 -0
  8. package/build/protos/protos.json +317 -1
  9. package/build/src/batch-transaction.js +2 -2
  10. package/build/src/codec.js +20 -21
  11. package/build/src/common-grpc/service.js +10 -10
  12. package/build/src/common.d.ts +1 -0
  13. package/build/src/common.js +9 -1
  14. package/build/src/database.d.ts +1 -0
  15. package/build/src/database.js +2 -0
  16. package/build/src/helper.d.ts +90 -0
  17. package/build/src/helper.js +154 -0
  18. package/build/src/index.d.ts +33 -0
  19. package/build/src/index.js +178 -8
  20. package/build/src/instrument.js +3 -2
  21. package/build/src/metrics/constants.d.ts +36 -0
  22. package/build/src/metrics/constants.js +106 -0
  23. package/build/src/metrics/external-types.d.ts +20 -0
  24. package/build/src/metrics/external-types.js +32 -0
  25. package/build/src/metrics/interceptor.d.ts +13 -0
  26. package/build/src/metrics/interceptor.js +87 -0
  27. package/build/src/metrics/metrics-tracer-factory.d.ts +165 -0
  28. package/build/src/metrics/metrics-tracer-factory.js +389 -0
  29. package/build/src/metrics/metrics-tracer.d.ts +204 -0
  30. package/build/src/metrics/metrics-tracer.js +371 -0
  31. package/build/src/metrics/spanner-metrics-exporter.d.ts +35 -0
  32. package/build/src/metrics/spanner-metrics-exporter.js +119 -0
  33. package/build/src/metrics/transform.d.ts +144 -0
  34. package/build/src/metrics/transform.js +272 -0
  35. package/build/src/partial-result-stream.js +9 -5
  36. package/build/src/session-factory.d.ts +34 -0
  37. package/build/src/session-factory.js +30 -0
  38. package/build/src/session-pool.js +1 -2
  39. package/build/src/transaction-runner.d.ts +1 -0
  40. package/build/src/transaction-runner.js +6 -0
  41. package/build/src/transaction.d.ts +42 -1
  42. package/build/src/transaction.js +192 -42
  43. package/build/src/v1/database_admin_client.d.ts +34 -0
  44. package/build/src/v1/database_admin_client.js +167 -1
  45. package/build/src/v1/database_admin_client_config.json +4 -0
  46. package/build/src/v1/instance_admin_client.d.ts +120 -0
  47. package/build/src/v1/instance_admin_client.js +312 -13
  48. package/build/src/v1/spanner_client.js +108 -0
  49. package/build/src/v1/spanner_proto_list.json +1 -0
  50. package/package.json +12 -5
@@ -28,330 +28,7 @@ option java_package = "com.google.spanner.v1";
28
28
  option php_namespace = "Google\\Cloud\\Spanner\\V1";
29
29
  option ruby_package = "Google::Cloud::Spanner::V1";
30
30
 
31
- // Transactions:
32
- //
33
- // Each session can have at most one active transaction at a time (note that
34
- // standalone reads and queries use a transaction internally and do count
35
- // towards the one transaction limit). After the active transaction is
36
- // completed, the session can immediately be re-used for the next transaction.
37
- // It is not necessary to create a new session for each transaction.
38
- //
39
- // Transaction modes:
40
- //
41
- // Cloud Spanner supports three transaction modes:
42
- //
43
- // 1. Locking read-write. This type of transaction is the only way
44
- // to write data into Cloud Spanner. These transactions rely on
45
- // pessimistic locking and, if necessary, two-phase commit.
46
- // Locking read-write transactions may abort, requiring the
47
- // application to retry.
48
- //
49
- // 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed
50
- // consistency across several reads, but do not allow
51
- // writes. Snapshot read-only transactions can be configured to read at
52
- // timestamps in the past, or configured to perform a strong read
53
- // (where Spanner will select a timestamp such that the read is
54
- // guaranteed to see the effects of all transactions that have committed
55
- // before the start of the read). Snapshot read-only transactions do not
56
- // need to be committed.
57
- //
58
- // Queries on change streams must be performed with the snapshot read-only
59
- // transaction mode, specifying a strong read. Please see
60
- // [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong]
61
- // for more details.
62
- //
63
- // 3. Partitioned DML. This type of transaction is used to execute
64
- // a single Partitioned DML statement. Partitioned DML partitions
65
- // the key space and runs the DML statement over each partition
66
- // in parallel using separate, internal transactions that commit
67
- // independently. Partitioned DML transactions do not need to be
68
- // committed.
69
- //
70
- // For transactions that only read, snapshot read-only transactions
71
- // provide simpler semantics and are almost always faster. In
72
- // particular, read-only transactions do not take locks, so they do
73
- // not conflict with read-write transactions. As a consequence of not
74
- // taking locks, they also do not abort, so retry loops are not needed.
75
- //
76
- // Transactions may only read-write data in a single database. They
77
- // may, however, read-write data in different tables within that
78
- // database.
79
- //
80
- // Locking read-write transactions:
81
- //
82
- // Locking transactions may be used to atomically read-modify-write
83
- // data anywhere in a database. This type of transaction is externally
84
- // consistent.
85
- //
86
- // Clients should attempt to minimize the amount of time a transaction
87
- // is active. Faster transactions commit with higher probability
88
- // and cause less contention. Cloud Spanner attempts to keep read locks
89
- // active as long as the transaction continues to do reads, and the
90
- // transaction has not been terminated by
91
- // [Commit][google.spanner.v1.Spanner.Commit] or
92
- // [Rollback][google.spanner.v1.Spanner.Rollback]. Long periods of
93
- // inactivity at the client may cause Cloud Spanner to release a
94
- // transaction's locks and abort it.
95
- //
96
- // Conceptually, a read-write transaction consists of zero or more
97
- // reads or SQL statements followed by
98
- // [Commit][google.spanner.v1.Spanner.Commit]. At any time before
99
- // [Commit][google.spanner.v1.Spanner.Commit], the client can send a
100
- // [Rollback][google.spanner.v1.Spanner.Rollback] request to abort the
101
- // transaction.
102
- //
103
- // Semantics:
104
- //
105
- // Cloud Spanner can commit the transaction if all read locks it acquired
106
- // are still valid at commit time, and it is able to acquire write
107
- // locks for all writes. Cloud Spanner can abort the transaction for any
108
- // reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees
109
- // that the transaction has not modified any user data in Cloud Spanner.
110
- //
111
- // Unless the transaction commits, Cloud Spanner makes no guarantees about
112
- // how long the transaction's locks were held for. It is an error to
113
- // use Cloud Spanner locks for any sort of mutual exclusion other than
114
- // between Cloud Spanner transactions themselves.
115
- //
116
- // Retrying aborted transactions:
117
- //
118
- // When a transaction aborts, the application can choose to retry the
119
- // whole transaction again. To maximize the chances of successfully
120
- // committing the retry, the client should execute the retry in the
121
- // same session as the original attempt. The original session's lock
122
- // priority increases with each consecutive abort, meaning that each
123
- // attempt has a slightly better chance of success than the previous.
124
- //
125
- // Under some circumstances (for example, many transactions attempting to
126
- // modify the same row(s)), a transaction can abort many times in a
127
- // short period before successfully committing. Thus, it is not a good
128
- // idea to cap the number of retries a transaction can attempt;
129
- // instead, it is better to limit the total amount of time spent
130
- // retrying.
131
- //
132
- // Idle transactions:
133
- //
134
- // A transaction is considered idle if it has no outstanding reads or
135
- // SQL queries and has not started a read or SQL query within the last 10
136
- // seconds. Idle transactions can be aborted by Cloud Spanner so that they
137
- // don't hold on to locks indefinitely. If an idle transaction is aborted, the
138
- // commit will fail with error `ABORTED`.
139
- //
140
- // If this behavior is undesirable, periodically executing a simple
141
- // SQL query in the transaction (for example, `SELECT 1`) prevents the
142
- // transaction from becoming idle.
143
- //
144
- // Snapshot read-only transactions:
145
- //
146
- // Snapshot read-only transactions provides a simpler method than
147
- // locking read-write transactions for doing several consistent
148
- // reads. However, this type of transaction does not support writes.
149
- //
150
- // Snapshot transactions do not take locks. Instead, they work by
151
- // choosing a Cloud Spanner timestamp, then executing all reads at that
152
- // timestamp. Since they do not acquire locks, they do not block
153
- // concurrent read-write transactions.
154
- //
155
- // Unlike locking read-write transactions, snapshot read-only
156
- // transactions never abort. They can fail if the chosen read
157
- // timestamp is garbage collected; however, the default garbage
158
- // collection policy is generous enough that most applications do not
159
- // need to worry about this in practice.
160
- //
161
- // Snapshot read-only transactions do not need to call
162
- // [Commit][google.spanner.v1.Spanner.Commit] or
163
- // [Rollback][google.spanner.v1.Spanner.Rollback] (and in fact are not
164
- // permitted to do so).
165
- //
166
- // To execute a snapshot transaction, the client specifies a timestamp
167
- // bound, which tells Cloud Spanner how to choose a read timestamp.
168
- //
169
- // The types of timestamp bound are:
170
- //
171
- // - Strong (the default).
172
- // - Bounded staleness.
173
- // - Exact staleness.
174
- //
175
- // If the Cloud Spanner database to be read is geographically distributed,
176
- // stale read-only transactions can execute more quickly than strong
177
- // or read-write transactions, because they are able to execute far
178
- // from the leader replica.
179
- //
180
- // Each type of timestamp bound is discussed in detail below.
181
- //
182
- // Strong: Strong reads are guaranteed to see the effects of all transactions
183
- // that have committed before the start of the read. Furthermore, all
184
- // rows yielded by a single read are consistent with each other -- if
185
- // any part of the read observes a transaction, all parts of the read
186
- // see the transaction.
187
- //
188
- // Strong reads are not repeatable: two consecutive strong read-only
189
- // transactions might return inconsistent results if there are
190
- // concurrent writes. If consistency across reads is required, the
191
- // reads should be executed within a transaction or at an exact read
192
- // timestamp.
193
- //
194
- // Queries on change streams (see below for more details) must also specify
195
- // the strong read timestamp bound.
196
- //
197
- // See
198
- // [TransactionOptions.ReadOnly.strong][google.spanner.v1.TransactionOptions.ReadOnly.strong].
199
- //
200
- // Exact staleness:
201
- //
202
- // These timestamp bounds execute reads at a user-specified
203
- // timestamp. Reads at a timestamp are guaranteed to see a consistent
204
- // prefix of the global transaction history: they observe
205
- // modifications done by all transactions with a commit timestamp less than or
206
- // equal to the read timestamp, and observe none of the modifications done by
207
- // transactions with a larger commit timestamp. They will block until
208
- // all conflicting transactions that may be assigned commit timestamps
209
- // <= the read timestamp have finished.
210
- //
211
- // The timestamp can either be expressed as an absolute Cloud Spanner commit
212
- // timestamp or a staleness relative to the current time.
213
- //
214
- // These modes do not require a "negotiation phase" to pick a
215
- // timestamp. As a result, they execute slightly faster than the
216
- // equivalent boundedly stale concurrency modes. On the other hand,
217
- // boundedly stale reads usually return fresher results.
218
- //
219
- // See
220
- // [TransactionOptions.ReadOnly.read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.read_timestamp]
221
- // and
222
- // [TransactionOptions.ReadOnly.exact_staleness][google.spanner.v1.TransactionOptions.ReadOnly.exact_staleness].
223
- //
224
- // Bounded staleness:
225
- //
226
- // Bounded staleness modes allow Cloud Spanner to pick the read timestamp,
227
- // subject to a user-provided staleness bound. Cloud Spanner chooses the
228
- // newest timestamp within the staleness bound that allows execution
229
- // of the reads at the closest available replica without blocking.
230
- //
231
- // All rows yielded are consistent with each other -- if any part of
232
- // the read observes a transaction, all parts of the read see the
233
- // transaction. Boundedly stale reads are not repeatable: two stale
234
- // reads, even if they use the same staleness bound, can execute at
235
- // different timestamps and thus return inconsistent results.
236
- //
237
- // Boundedly stale reads execute in two phases: the first phase
238
- // negotiates a timestamp among all replicas needed to serve the
239
- // read. In the second phase, reads are executed at the negotiated
240
- // timestamp.
241
- //
242
- // As a result of the two phase execution, bounded staleness reads are
243
- // usually a little slower than comparable exact staleness
244
- // reads. However, they are typically able to return fresher
245
- // results, and are more likely to execute at the closest replica.
246
- //
247
- // Because the timestamp negotiation requires up-front knowledge of
248
- // which rows will be read, it can only be used with single-use
249
- // read-only transactions.
250
- //
251
- // See
252
- // [TransactionOptions.ReadOnly.max_staleness][google.spanner.v1.TransactionOptions.ReadOnly.max_staleness]
253
- // and
254
- // [TransactionOptions.ReadOnly.min_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.min_read_timestamp].
255
- //
256
- // Old read timestamps and garbage collection:
257
- //
258
- // Cloud Spanner continuously garbage collects deleted and overwritten data
259
- // in the background to reclaim storage space. This process is known
260
- // as "version GC". By default, version GC reclaims versions after they
261
- // are one hour old. Because of this, Cloud Spanner cannot perform reads
262
- // at read timestamps more than one hour in the past. This
263
- // restriction also applies to in-progress reads and/or SQL queries whose
264
- // timestamp become too old while executing. Reads and SQL queries with
265
- // too-old read timestamps fail with the error `FAILED_PRECONDITION`.
266
- //
267
- // You can configure and extend the `VERSION_RETENTION_PERIOD` of a
268
- // database up to a period as long as one week, which allows Cloud Spanner
269
- // to perform reads up to one week in the past.
270
- //
271
- // Querying change Streams:
272
- //
273
- // A Change Stream is a schema object that can be configured to watch data
274
- // changes on the entire database, a set of tables, or a set of columns
275
- // in a database.
276
- //
277
- // When a change stream is created, Spanner automatically defines a
278
- // corresponding SQL Table-Valued Function (TVF) that can be used to query
279
- // the change records in the associated change stream using the
280
- // ExecuteStreamingSql API. The name of the TVF for a change stream is
281
- // generated from the name of the change stream: READ_<change_stream_name>.
282
- //
283
- // All queries on change stream TVFs must be executed using the
284
- // ExecuteStreamingSql API with a single-use read-only transaction with a
285
- // strong read-only timestamp_bound. The change stream TVF allows users to
286
- // specify the start_timestamp and end_timestamp for the time range of
287
- // interest. All change records within the retention period is accessible
288
- // using the strong read-only timestamp_bound. All other TransactionOptions
289
- // are invalid for change stream queries.
290
- //
291
- // In addition, if TransactionOptions.read_only.return_read_timestamp is set
292
- // to true, a special value of 2^63 - 2 will be returned in the
293
- // [Transaction][google.spanner.v1.Transaction] message that describes the
294
- // transaction, instead of a valid read timestamp. This special value should be
295
- // discarded and not used for any subsequent queries.
296
- //
297
- // Please see https://cloud.google.com/spanner/docs/change-streams
298
- // for more details on how to query the change stream TVFs.
299
- //
300
- // Partitioned DML transactions:
301
- //
302
- // Partitioned DML transactions are used to execute DML statements with a
303
- // different execution strategy that provides different, and often better,
304
- // scalability properties for large, table-wide operations than DML in a
305
- // ReadWrite transaction. Smaller scoped statements, such as an OLTP workload,
306
- // should prefer using ReadWrite transactions.
307
- //
308
- // Partitioned DML partitions the keyspace and runs the DML statement on each
309
- // partition in separate, internal transactions. These transactions commit
310
- // automatically when complete, and run independently from one another.
311
- //
312
- // To reduce lock contention, this execution strategy only acquires read locks
313
- // on rows that match the WHERE clause of the statement. Additionally, the
314
- // smaller per-partition transactions hold locks for less time.
315
- //
316
- // That said, Partitioned DML is not a drop-in replacement for standard DML used
317
- // in ReadWrite transactions.
318
- //
319
- // - The DML statement must be fully-partitionable. Specifically, the statement
320
- // must be expressible as the union of many statements which each access only
321
- // a single row of the table.
322
- //
323
- // - The statement is not applied atomically to all rows of the table. Rather,
324
- // the statement is applied atomically to partitions of the table, in
325
- // independent transactions. Secondary index rows are updated atomically
326
- // with the base table rows.
327
- //
328
- // - Partitioned DML does not guarantee exactly-once execution semantics
329
- // against a partition. The statement will be applied at least once to each
330
- // partition. It is strongly recommended that the DML statement should be
331
- // idempotent to avoid unexpected results. For instance, it is potentially
332
- // dangerous to run a statement such as
333
- // `UPDATE table SET column = column + 1` as it could be run multiple times
334
- // against some rows.
335
- //
336
- // - The partitions are committed automatically - there is no support for
337
- // Commit or Rollback. If the call returns an error, or if the client issuing
338
- // the ExecuteSql call dies, it is possible that some rows had the statement
339
- // executed on them successfully. It is also possible that statement was
340
- // never executed against other rows.
341
- //
342
- // - Partitioned DML transactions may only contain the execution of a single
343
- // DML statement via ExecuteSql or ExecuteStreamingSql.
344
- //
345
- // - If any error is encountered during the execution of the partitioned DML
346
- // operation (for instance, a UNIQUE INDEX violation, division by zero, or a
347
- // value that cannot be stored due to schema constraints), then the
348
- // operation is stopped at that point and an error is returned. It is
349
- // possible that at this point, some partitions have been committed (or even
350
- // committed multiple times), and other partitions have not been run at all.
351
- //
352
- // Given the above, Partitioned DML is good fit for large, database-wide,
353
- // operations that are idempotent, such as deleting old rows from a very large
354
- // table.
31
+ // Options to use for transactions.
355
32
  message TransactionOptions {
356
33
  // Message type to initiate a read-write transaction. Currently this
357
34
  // transaction type has no options.
@@ -361,23 +38,26 @@ message TransactionOptions {
361
38
  enum ReadLockMode {
362
39
  // Default value.
363
40
  //
364
- // * If isolation level is `REPEATABLE_READ`, then it is an error to
365
- // specify `read_lock_mode`. Locking semantics default to `OPTIMISTIC`.
366
- // No validation checks are done for reads, except for:
41
+ // * If isolation level is
42
+ // [REPEATABLE_READ][google.spanner.v1.TransactionOptions.IsolationLevel.REPEATABLE_READ],
43
+ // then it is an error to specify `read_lock_mode`. Locking semantics
44
+ // default to `OPTIMISTIC`. No validation checks are done for reads,
45
+ // except to validate that the data that was served at the snapshot time
46
+ // is unchanged at commit time in the following cases:
367
47
  // 1. reads done as part of queries that use `SELECT FOR UPDATE`
368
48
  // 2. reads done as part of statements with a `LOCK_SCANNED_RANGES`
369
49
  // hint
370
50
  // 3. reads done as part of DML statements
371
- // to validate that the data that was served at the snapshot time is
372
- // unchanged at commit time.
373
51
  // * At all other isolation levels, if `read_lock_mode` is the default
374
- // value, then pessimistic read lock is used.
52
+ // value, then pessimistic read locks are used.
375
53
  READ_LOCK_MODE_UNSPECIFIED = 0;
376
54
 
377
55
  // Pessimistic lock mode.
378
56
  //
379
57
  // Read locks are acquired immediately on read.
380
- // Semantics described only applies to `SERIALIZABLE` isolation.
58
+ // Semantics described only applies to
59
+ // [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE]
60
+ // isolation.
381
61
  PESSIMISTIC = 1;
382
62
 
383
63
  // Optimistic lock mode.
@@ -385,7 +65,9 @@ message TransactionOptions {
385
65
  // Locks for reads within the transaction are not acquired on read.
386
66
  // Instead the locks are acquired on a commit to validate that
387
67
  // read/queried data has not changed since the transaction started.
388
- // Semantics described only applies to `SERIALIZABLE` isolation.
68
+ // Semantics described only applies to
69
+ // [SERIALIZABLE][google.spanner.v1.TransactionOptions.IsolationLevel.SERIALIZABLE]
70
+ // isolation.
389
71
  OPTIMISTIC = 2;
390
72
  }
391
73
 
@@ -395,8 +77,6 @@ message TransactionOptions {
395
77
  // Optional. Clients should pass the transaction ID of the previous
396
78
  // transaction attempt that was aborted if this transaction is being
397
79
  // executed on a multiplexed session.
398
- // This feature is not yet supported and will result in an UNIMPLEMENTED
399
- // error.
400
80
  bytes multiplexed_session_previous_transaction_id = 2
401
81
  [(google.api.field_behavior) = OPTIONAL];
402
82
  }
@@ -442,7 +122,7 @@ message TransactionOptions {
442
122
  // Executes all reads at the given timestamp. Unlike other modes,
443
123
  // reads at a specific timestamp are repeatable; the same read at
444
124
  // the same timestamp always returns the same data. If the
445
- // timestamp is in the future, the read will block until the
125
+ // timestamp is in the future, the read is blocked until the
446
126
  // specified timestamp, modulo the read's deadline.
447
127
  //
448
128
  // Useful for large scale consistent reads such as mapreduces, or
@@ -491,9 +171,9 @@ message TransactionOptions {
491
171
  SERIALIZABLE = 1;
492
172
 
493
173
  // All reads performed during the transaction observe a consistent snapshot
494
- // of the database, and the transaction will only successfully commit in the
495
- // absence of conflicts between its updates and any concurrent updates that
496
- // have occurred since that snapshot. Consequently, in contrast to
174
+ // of the database, and the transaction is only successfully committed in
175
+ // the absence of conflicts between its updates and any concurrent updates
176
+ // that have occurred since that snapshot. Consequently, in contrast to
497
177
  // `SERIALIZABLE` transactions, only write-write conflicts are detected in
498
178
  // snapshot transactions.
499
179
  //
@@ -521,7 +201,7 @@ message TransactionOptions {
521
201
  // on the `session` resource.
522
202
  PartitionedDml partitioned_dml = 3;
523
203
 
524
- // Transaction will not write.
204
+ // Transaction does not write.
525
205
  //
526
206
  // Authorization to begin a read-only transaction requires
527
207
  // `spanner.databases.beginReadOnlyTransaction` permission
@@ -529,20 +209,24 @@ message TransactionOptions {
529
209
  ReadOnly read_only = 2;
530
210
  }
531
211
 
532
- // When `exclude_txn_from_change_streams` is set to `true`:
533
- // * Mutations from this transaction will not be recorded in change streams
534
- // with DDL option `allow_txn_exclusion=true` that are tracking columns
535
- // modified by these transactions.
536
- // * Mutations from this transaction will be recorded in change streams with
537
- // DDL option `allow_txn_exclusion=false or not set` that are tracking
538
- // columns modified by these transactions.
212
+ // When `exclude_txn_from_change_streams` is set to `true`, it prevents read
213
+ // or write transactions from being tracked in change streams.
214
+ //
215
+ // * If the DDL option `allow_txn_exclusion` is set to `true`, then the
216
+ // updates
217
+ // made within this transaction aren't recorded in the change stream.
218
+ //
219
+ // * If you don't set the DDL option `allow_txn_exclusion` or if it's
220
+ // set to `false`, then the updates made within this transaction are
221
+ // recorded in the change stream.
539
222
  //
540
223
  // When `exclude_txn_from_change_streams` is set to `false` or not set,
541
- // mutations from this transaction will be recorded in all change streams that
542
- // are tracking columns modified by these transactions.
543
- // `exclude_txn_from_change_streams` may only be specified for read-write or
544
- // partitioned-dml transactions, otherwise the API will return an
545
- // `INVALID_ARGUMENT` error.
224
+ // modifications from this transaction are recorded in all change streams
225
+ // that are tracking columns modified by these transactions.
226
+ //
227
+ // The `exclude_txn_from_change_streams` option can only be specified
228
+ // for read-write or partitioned DML transactions, otherwise the API returns
229
+ // an `INVALID_ARGUMENT` error.
546
230
  bool exclude_txn_from_change_streams = 5;
547
231
 
548
232
  // Isolation level for the transaction.
@@ -569,15 +253,13 @@ message Transaction {
569
253
  // Example: `"2014-10-02T15:01:23.045123456Z"`.
570
254
  google.protobuf.Timestamp read_timestamp = 2;
571
255
 
572
- // A precommit token will be included in the response of a BeginTransaction
256
+ // A precommit token is included in the response of a BeginTransaction
573
257
  // request if the read-write transaction is on a multiplexed session and
574
258
  // a mutation_key was specified in the
575
259
  // [BeginTransaction][google.spanner.v1.BeginTransactionRequest].
576
260
  // The precommit token with the highest sequence number from this transaction
577
261
  // attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit]
578
262
  // request for this transaction.
579
- // This feature is not yet supported and will result in an UNIMPLEMENTED
580
- // error.
581
263
  MultiplexedSessionPrecommitToken precommit_token = 3;
582
264
  }
583
265
 
@@ -609,8 +291,10 @@ message TransactionSelector {
609
291
 
610
292
  // When a read-write transaction is executed on a multiplexed session,
611
293
  // this precommit token is sent back to the client
612
- // as a part of the [Transaction] message in the BeginTransaction response and
613
- // also as a part of the [ResultSet] and [PartialResultSet] responses.
294
+ // as a part of the [Transaction][google.spanner.v1.Transaction] message in the
295
+ // [BeginTransaction][google.spanner.v1.BeginTransactionRequest] response and
296
+ // also as a part of the [ResultSet][google.spanner.v1.ResultSet] and
297
+ // [PartialResultSet][google.spanner.v1.PartialResultSet] responses.
614
298
  message MultiplexedSessionPrecommitToken {
615
299
  // Opaque precommit token.
616
300
  bytes precommit_token = 1;