Skip to content

Commit 2c6e4dd

Browse files
Google APIscopybara-github
authored andcommitted
feat(spanner): add leader_options to InstanceConfig and default_leader to Database
PiperOrigin-RevId: 382409094
1 parent 820d7ae commit 2c6e4dd

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

google/spanner/admin/database/v1/spanner_database_admin.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,14 @@ message Database {
399399
// sure to account for the time from the moment when the value is queried to
400400
// the moment when you initiate the recovery.
401401
google.protobuf.Timestamp earliest_version_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
402+
403+
// Output only. The read-write region which contains the database's leader
404+
// replicas.
405+
//
406+
// This is the same as the value of default_leader
407+
// database option set using DatabaseAdmin.CreateDatabase or
408+
// DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
409+
string default_leader = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
402410
}
403411

404412
// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].

google/spanner/admin/instance/v1/spanner_instance_admin.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ message InstanceConfig {
318318
// The geographic placement of nodes in this instance configuration and their
319319
// replication properties.
320320
repeated ReplicaInfo replicas = 3;
321+
322+
// Allowed values of the “default_leader” schema option for databases in
323+
// instances that use this instance configuration.
324+
repeated string leader_options = 4;
321325
}
322326

323327
// An isolated set of Cloud Spanner resources on which databases can be hosted.

0 commit comments

Comments
 (0)