xref: /aosp_15_r20/external/googleapis/google/spanner/v1/commit_response.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.spanner.v1;
18
19import "google/protobuf/timestamp.proto";
20
21option csharp_namespace = "Google.Cloud.Spanner.V1";
22option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
23option java_multiple_files = true;
24option java_outer_classname = "CommitResponseProto";
25option java_package = "com.google.spanner.v1";
26option php_namespace = "Google\\Cloud\\Spanner\\V1";
27option ruby_package = "Google::Cloud::Spanner::V1";
28
29// The response for [Commit][google.spanner.v1.Spanner.Commit].
30message CommitResponse {
31  // Additional statistics about a commit.
32  message CommitStats {
33    // The total number of mutations for the transaction. Knowing the
34    // `mutation_count` value can help you maximize the number of mutations
35    // in a transaction and minimize the number of API round trips. You can
36    // also monitor this value to prevent transactions from exceeding the system
37    // [limit](https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data).
38    // If the number of mutations exceeds the limit, the server returns
39    // [INVALID_ARGUMENT](https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
40    int64 mutation_count = 1;
41  }
42
43  // The Cloud Spanner timestamp at which the transaction committed.
44  google.protobuf.Timestamp commit_timestamp = 1;
45
46  // The statistics about this Commit. Not returned by default.
47  // For more information, see
48  // [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats].
49  CommitStats commit_stats = 2;
50}
51