@@ -331,6 +331,23 @@ service Spanner {
331331 };
332332 option (google.api.method_signature ) = "session,mutation_groups" ;
333333 }
334+
335+ // Retrieves a cache update for a given database.
336+ //
337+ // This RPC can be used to warm up the client cache by fetching key recipes
338+ // and server information for a given database. It is recommended to call
339+ // this RPC at the beginning of the client's lifecycle, prior to any other
340+ // data plane operations.
341+ //
342+ // The cache update is returned as a stream because the response can be too
343+ // large to fit into a single `CacheUpdate` message.
344+ rpc FetchCacheUpdate (FetchCacheUpdateRequest ) returns (stream CacheUpdate ) {
345+ option (google.api.http ) = {
346+ post : "/v1/{database=projects/*/instances/*/databases/*}:cacheUpdate"
347+ body : "*"
348+ };
349+ option (google.api.method_signature ) = "database" ;
350+ }
334351}
335352
336353// The request for [CreateSession][google.spanner.v1.Spanner.CreateSession].
@@ -827,7 +844,7 @@ message ExecuteSqlRequest {
827844 // be assumed until a subsequent `Commit` call completes successfully.
828845 bool last_statement = 17 [(google.api.field_behavior ) = OPTIONAL ];
829846
830- // Optional. If present, it makes the Spanner requests location-aware.
847+ // Optional. Makes the Spanner requests location-aware if present .
831848 //
832849 // It gives the server hints that can be used to route the request
833850 // to an appropriate server, potentially significantly decreasing latency and
@@ -1268,7 +1285,7 @@ message ReadRequest {
12681285 // transactions.
12691286 LockHint lock_hint = 17 [(google.api.field_behavior ) = OPTIONAL ];
12701287
1271- // Optional. If present, it makes the Spanner requests location-aware.
1288+ // Optional. Makes the Spanner requests location-aware if present .
12721289 //
12731290 // It gives the server hints that can be used to route the request
12741291 // to an appropriate server, potentially significantly decreasing latency and
@@ -1301,6 +1318,14 @@ message BeginTransactionRequest {
13011318 // randomly select one of the mutations from the mutation set and send it as a
13021319 // part of this request.
13031320 Mutation mutation_key = 4 [(google.api.field_behavior ) = OPTIONAL ];
1321+
1322+ // Optional. Makes the Spanner requests location-aware if present.
1323+ //
1324+ // It gives the server hints that can be used to route the request
1325+ // to an appropriate server, potentially significantly decreasing latency and
1326+ // improving throughput. To achieve improved performance, most fields must be
1327+ // filled in with accurate values.
1328+ RoutingHint routing_hint = 5 [(google.api.field_behavior ) = OPTIONAL ];
13041329}
13051330
13061331// The request for [Commit][google.spanner.v1.Spanner.Commit].
@@ -1355,6 +1380,14 @@ message CommitRequest {
13551380 // results in a `FailedPrecondition` error.
13561381 MultiplexedSessionPrecommitToken precommit_token = 9
13571382 [(google.api.field_behavior ) = OPTIONAL ];
1383+
1384+ // Optional. Makes the Spanner requests location-aware if present.
1385+ //
1386+ // It gives the server hints that can be used to route the request
1387+ // to an appropriate server, potentially significantly decreasing latency and
1388+ // improving throughput. To achieve improved performance, most fields must be
1389+ // filled in with accurate values.
1390+ RoutingHint routing_hint = 10 [(google.api.field_behavior ) = OPTIONAL ];
13581391}
13591392
13601393// The request for [Rollback][google.spanner.v1.Spanner.Rollback].
@@ -1417,3 +1450,23 @@ message BatchWriteResponse {
14171450 // condition not being satisfied after evaluation.
14181451 google.protobuf.Timestamp commit_timestamp = 3 ;
14191452}
1453+
1454+ // The request for
1455+ // [FetchCacheUpdate][google.spanner.v1.Spanner.FetchCacheUpdate].
1456+ message FetchCacheUpdateRequest {
1457+ // Required. The database for which to retrieve the cache update.
1458+ string database = 1 [
1459+ (google.api.field_behavior ) = REQUIRED ,
1460+ (google.api.resource_reference ) = {
1461+ type : "spanner.googleapis.com/Database"
1462+ }
1463+ ];
1464+
1465+ // Optional. The maximum number of key recipes to return in the response.
1466+ // If not set, a default limit of 100 will be used.
1467+ int32 max_recipe_count = 2 [(google.api.field_behavior ) = OPTIONAL ];
1468+
1469+ // Optional. The maximum number of ranges to return in the response.
1470+ // If not set, a default limit of 10000 will be used.
1471+ int32 max_range_count = 3 [(google.api.field_behavior ) = OPTIONAL ];
1472+ }
0 commit comments