Skip to content

Commit 6cce671

Browse files
Google APIscopybara-github
authored andcommitted
feat: add WarmAndPing request for channel priming
PiperOrigin-RevId: 428795660
1 parent 82cc6da commit 6cce671

4 files changed

Lines changed: 52 additions & 31 deletions

File tree

google/bigtable/v2/bigtable.proto

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -36,6 +36,10 @@ option (google.api.resource_definition) = {
3636
type: "bigtableadmin.googleapis.com/Table"
3737
pattern: "projects/{project}/instances/{instance}/tables/{table}"
3838
};
39+
option (google.api.resource_definition) = {
40+
type: "bigtableadmin.googleapis.com/Instance"
41+
pattern: "projects/{project}/instances/{instance}"
42+
};
3943

4044
// Service for reading from and writing to existing Bigtable tables.
4145
service Bigtable {
@@ -152,6 +156,26 @@ service Bigtable {
152156
option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id";
153157
}
154158

159+
// Warm up associated instance metadata for this connection.
160+
// This call is not required but may be useful for connection keep-alive.
161+
rpc PingAndWarm(PingAndWarmRequest) returns (PingAndWarmResponse) {
162+
option (google.api.http) = {
163+
post: "/v2/{name=projects/*/instances/*}:ping"
164+
body: "*"
165+
};
166+
option (google.api.routing) = {
167+
routing_parameters {
168+
field: "name"
169+
path_template: "{name=projects/*/instances/*}"
170+
}
171+
routing_parameters {
172+
field: "app_profile_id"
173+
}
174+
};
175+
option (google.api.method_signature) = "name";
176+
option (google.api.method_signature) = "name,app_profile_id";
177+
}
178+
155179
// Modifies a row atomically on the server. The method reads the latest
156180
// existing timestamp and value from the specified columns and writes a new
157181
// entry based on pre-defined read/modify/write rules. The new value for the
@@ -450,6 +474,27 @@ message CheckAndMutateRowResponse {
450474
bool predicate_matched = 1;
451475
}
452476

477+
// Request message for client connection keep-alive and warming.
478+
message PingAndWarmRequest {
479+
// Required. The unique name of the instance to check permissions for as well as
480+
// respond. Values are of the form `projects/<project>/instances/<instance>`.
481+
string name = 1 [
482+
(google.api.field_behavior) = REQUIRED,
483+
(google.api.resource_reference) = {
484+
type: "bigtableadmin.googleapis.com/Instance"
485+
}
486+
];
487+
488+
// This value specifies routing for replication. If not specified, the
489+
// "default" application profile will be used.
490+
string app_profile_id = 2;
491+
}
492+
493+
// Response message for Bigtable.PingAndWarm connection keepalive and warming.
494+
message PingAndWarmResponse {
495+
496+
}
497+
453498
// Request message for Bigtable.ReadModifyWriteRow.
454499
message ReadModifyWriteRowRequest {
455500
// Required. The unique name of the table to which the read/modify/write rules should be

google/bigtable/v2/bigtable_grpc_service_config.json

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,7 @@
1111
"method": "ReadModifyWriteRow"
1212
}
1313
],
14-
"timeout": "20s",
15-
"retryPolicy": {
16-
"initialBackoff": "0.010s",
17-
"maxBackoff": "60s",
18-
"backoffMultiplier": 2,
19-
"retryableStatusCodes": []
20-
}
14+
"timeout": "20s"
2115
},
2216
{
2317
"name": [
@@ -26,13 +20,7 @@
2620
"method": "SampleRowKeys"
2721
}
2822
],
29-
"timeout": "60s",
30-
"retryPolicy": {
31-
"initialBackoff": "0.010s",
32-
"maxBackoff": "60s",
33-
"backoffMultiplier": 2,
34-
"retryableStatusCodes": []
35-
}
23+
"timeout": "60s"
3624
},
3725
{
3826
"name": [
@@ -41,13 +29,7 @@
4129
"method": "MutateRows"
4230
}
4331
],
44-
"timeout": "600s",
45-
"retryPolicy": {
46-
"initialBackoff": "0.010s",
47-
"maxBackoff": "60s",
48-
"backoffMultiplier": 2,
49-
"retryableStatusCodes": []
50-
}
32+
"timeout": "600s"
5133
},
5234
{
5335
"name": [
@@ -56,13 +38,7 @@
5638
"method": "ReadRows"
5739
}
5840
],
59-
"timeout": "43200s",
60-
"retryPolicy": {
61-
"initialBackoff": "0.010s",
62-
"maxBackoff": "60s",
63-
"backoffMultiplier": 2,
64-
"retryableStatusCodes": []
65-
}
41+
"timeout": "43200s"
6642
},
6743
{
6844
"name": [

google/bigtable/v2/bigtable_v2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
type: google.api.Service
2-
config_version: 1
2+
config_version: 3
33
name: bigtable.googleapis.com
44
title: Cloud Bigtable API
55

google/bigtable/v2/data.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)