From 8e8a37da239bf53604509bf8153b792adad7eca3 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 14 Feb 2024 09:42:13 -0800 Subject: [PATCH] feat(spanner): add field for multiplexed session in spanner.proto docs: update comments PiperOrigin-RevId: 607015598 --- google/spanner/v1/spanner.proto | 34 ++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/google/spanner/v1/spanner.proto b/google/spanner/v1/spanner.proto index ae193edc5b42f..440ebf785468b 100644 --- a/google/spanner/v1/spanner.proto +++ b/google/spanner/v1/spanner.proto @@ -402,6 +402,15 @@ message Session { // The database role which created this session. string creator_role = 5; + + // Optional. If true, specifies a multiplexed session. A multiplexed session + // may be used for multiple, concurrent read-only operations but can not be + // used for read-write transactions, partitioned reads, or partitioned + // queries. Multiplexed sessions can be created via + // [CreateSession][google.spanner.v1.Spanner.CreateSession] but not via + // [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. + // Multiplexed sessions may not be deleted nor listed. + bool multiplexed = 6 [(google.api.field_behavior) = OPTIONAL]; } // The request for [GetSession][google.spanner.v1.Spanner.GetSession]. @@ -546,7 +555,7 @@ message DirectedReadOptions { // * `location:us-east1` --> The "us-east1" replica(s) of any available type // will be used to process the request. // * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in nearest - // . available location will be used to process the + // available location will be used to process the // request. // * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) // in location "us-east1" will be used to process @@ -590,8 +599,7 @@ message DirectedReadOptions { repeated ReplicaSelection replica_selections = 1; } - // Required. Replicas indicates the order in which replicas should be - // considered. At most one of either include_replicas or exclude_replicas + // Required. At most one of either include_replicas or exclude_replicas // should be present in the message. oneof replicas { // Include_replicas indicates the order of replicas (as they appear in @@ -601,8 +609,9 @@ message DirectedReadOptions { // may fail due to `DEADLINE_EXCEEDED` errors. IncludeReplicas include_replicas = 1; - // Exclude_replicas indicates that should be excluded from serving - // requests. Spanner will not route requests to the replicas in this list. + // Exclude_replicas indicates that specified replicas should be excluded + // from serving requests. Spanner will not route requests to the replicas + // in this list. ExcludeReplicas exclude_replicas = 2; } } @@ -1211,6 +1220,21 @@ message BatchWriteRequest { // Required. The groups of mutations to be applied. repeated MutationGroup mutation_groups = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. When `exclude_txn_from_change_streams` is set to `true`: + // * Mutations from all transactions in this batch write operation will not + // be recorded in change streams with DDL option `allow_txn_exclusion=true` + // that are tracking columns modified by these transactions. + // * Mutations from all transactions in this batch write operation will be + // recorded in change streams with DDL option `allow_txn_exclusion=false or + // not set` that are tracking columns modified by these transactions. + // + // When `exclude_txn_from_change_streams` is set to `false` or not set, + // mutations from all transactions in this batch write operation will be + // recorded in all change streams that are tracking columns modified by these + // transactions. + bool exclude_txn_from_change_streams = 5 + [(google.api.field_behavior) = OPTIONAL]; } // The result of applying a batch of mutations.