@@ -16,6 +16,7 @@ syntax = "proto3";
1616
1717package google.spanner.v1 ;
1818
19+ import "google/api/field_behavior.proto" ;
1920import "google/protobuf/duration.proto" ;
2021import "google/protobuf/timestamp.proto" ;
2122
@@ -378,6 +379,14 @@ message TransactionOptions {
378379
379380 // Read lock mode for the transaction.
380381 ReadLockMode read_lock_mode = 1 ;
382+
383+ // Optional. Clients should pass the transaction ID of the previous
384+ // transaction attempt that was aborted if this transaction is being
385+ // executed on a multiplexed session.
386+ // This feature is not yet supported and will result in an UNIMPLEMENTED
387+ // error.
388+ bytes multiplexed_session_previous_transaction_id = 2
389+ [(google.api.field_behavior ) = OPTIONAL ];
381390 }
382391
383392 // Message type to initiate a Partitioned DML transaction.
@@ -512,6 +521,17 @@ message Transaction {
512521 // A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
513522 // Example: `"2014-10-02T15:01:23.045123456Z"`.
514523 google.protobuf.Timestamp read_timestamp = 2 ;
524+
525+ // A precommit token will be included in the response of a BeginTransaction
526+ // request if the read-write transaction is on a multiplexed session and
527+ // a mutation_key was specified in the
528+ // [BeginTransaction][google.spanner.v1.BeginTransactionRequest].
529+ // The precommit token with the highest sequence number from this transaction
530+ // attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit]
531+ // request for this transaction.
532+ // This feature is not yet supported and will result in an UNIMPLEMENTED
533+ // error.
534+ MultiplexedSessionPrecommitToken precommit_token = 3 ;
515535}
516536
517537// This message is used to select the transaction in which a
@@ -539,3 +559,17 @@ message TransactionSelector {
539559 TransactionOptions begin = 3 ;
540560 }
541561}
562+
563+ // When a read-write transaction is executed on a multiplexed session,
564+ // this precommit token is sent back to the client
565+ // as a part of the [Transaction] message in the BeginTransaction response and
566+ // also as a part of the [ResultSet] and [PartialResultSet] responses.
567+ message MultiplexedSessionPrecommitToken {
568+ // Opaque precommit token.
569+ bytes precommit_token = 1 ;
570+
571+ // An incrementing seq number is generated on every precommit token
572+ // that is returned. Clients should remember the precommit token with the
573+ // highest sequence number from the current transaction attempt.
574+ int32 seq_num = 2 ;
575+ }
0 commit comments