Skip to content

Commit f2c4a78

Browse files
gcf-owl-bot[bot]gcf-merge-on-green[bot]ddelgrosso1
authored
feat: [datastream] Max concurrent backfill tasks (#4254)
* feat: Max concurrent backfill tasks You can now set the number of maximum concurrent backfill tasks for a stream using the Datastream API. PiperOrigin-RevId: 530067890 Source-Link: googleapis/googleapis@b2c290f Source-Link: googleapis/googleapis-gen@83c5413 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFzdHJlYW0vLk93bEJvdC55YW1sIiwiaCI6IjgzYzU0MTNlNTM1Y2I2ZmE3MTA1NDFkYzZlMTY5YThhNDRiOGE2NWQifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Co-authored-by: Denis DelGrosso <[email protected]>
1 parent 28d4b0e commit f2c4a78

20 files changed

+393
-200
lines changed

packages/google-cloud-datastream/README.md

Lines changed: 49 additions & 50 deletions
Large diffs are not rendered by default.

packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream.proto

Lines changed: 76 additions & 43 deletions
Large diffs are not rendered by default.

packages/google-cloud-datastream/protos/google/cloud/datastream/v1/datastream_resources.proto

Lines changed: 72 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 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.
@@ -103,14 +103,12 @@ message GcsProfile {
103103
}
104104

105105
// BigQuery warehouse profile.
106-
message BigQueryProfile {
106+
message BigQueryProfile {}
107107

108-
}
109-
110-
// Static IP address connectivity.
111-
message StaticServiceIpConnectivity {
112-
113-
}
108+
// Static IP address connectivity. Used when the source database is configured
109+
// to allow incoming connections from the Datastream public IP addresses
110+
// for the region specified in the connection profile.
111+
message StaticServiceIpConnectivity {}
114112

115113
// Forward SSH Tunnel connectivity.
116114
message ForwardSshTunnelConnectivity {
@@ -181,10 +179,12 @@ message PrivateConnection {
181179
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
182180

183181
// Output only. The create time of the resource.
184-
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
182+
google.protobuf.Timestamp create_time = 2
183+
[(google.api.field_behavior) = OUTPUT_ONLY];
185184

186185
// Output only. The update time of the resource.
187-
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
186+
google.protobuf.Timestamp update_time = 3
187+
[(google.api.field_behavior) = OUTPUT_ONLY];
188188

189189
// Labels.
190190
map<string, string> labels = 4;
@@ -195,7 +195,8 @@ message PrivateConnection {
195195
// Output only. The state of the Private Connection.
196196
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
197197

198-
// Output only. In case of error, the details of the error in a user-friendly format.
198+
// Output only. In case of error, the details of the error in a user-friendly
199+
// format.
199200
Error error = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
200201

201202
// VPC Peering Config.
@@ -226,10 +227,12 @@ message Route {
226227
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
227228

228229
// Output only. The create time of the resource.
229-
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
230+
google.protobuf.Timestamp create_time = 2
231+
[(google.api.field_behavior) = OUTPUT_ONLY];
230232

231233
// Output only. The update time of the resource.
232-
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
234+
google.protobuf.Timestamp update_time = 3
235+
[(google.api.field_behavior) = OUTPUT_ONLY];
233236

234237
// Labels.
235238
map<string, string> labels = 4;
@@ -262,8 +265,8 @@ message MysqlSslConfig {
262265
// Output only. Indicates whether the client_certificate field is set.
263266
bool client_certificate_set = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
264267

265-
// Input only. PEM-encoded certificate of the CA that signed the source database
266-
// server's certificate.
268+
// Input only. PEM-encoded certificate of the CA that signed the source
269+
// database server's certificate.
267270
string ca_certificate = 5 [(google.api.field_behavior) = INPUT_ONLY];
268271

269272
// Output only. Indicates whether the ca_certificate field is set.
@@ -282,10 +285,12 @@ message ConnectionProfile {
282285
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
283286

284287
// Output only. The create time of the resource.
285-
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
288+
google.protobuf.Timestamp create_time = 2
289+
[(google.api.field_behavior) = OUTPUT_ONLY];
286290

287291
// Output only. The update time of the resource.
288-
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
292+
google.protobuf.Timestamp update_time = 3
293+
[(google.api.field_behavior) = OUTPUT_ONLY];
289294

290295
// Labels.
291296
map<string, string> labels = 4;
@@ -383,31 +388,31 @@ message OracleRdbms {
383388
// Oracle data source configuration
384389
message OracleSourceConfig {
385390
// Configuration to drop large object values.
386-
message DropLargeObjects {
387-
388-
}
391+
message DropLargeObjects {}
389392

390393
// Configuration to stream large object values.
391-
message StreamLargeObjects {
392-
393-
}
394+
message StreamLargeObjects {}
394395

395396
// Oracle objects to include in the stream.
396397
OracleRdbms include_objects = 1;
397398

398399
// Oracle objects to exclude from the stream.
399400
OracleRdbms exclude_objects = 2;
400401

401-
// Maximum number of concurrent CDC tasks. The number should be non negative.
402-
// If not set (or set to 0), the system's default value will be used.
402+
// Maximum number of concurrent CDC tasks. The number should be non-negative.
403+
// If not set (or set to 0), the system's default value is used.
403404
int32 max_concurrent_cdc_tasks = 3;
404405

406+
// Maximum number of concurrent backfill tasks. The number should be
407+
// non-negative. If not set (or set to 0), the system's default value is used.
408+
int32 max_concurrent_backfill_tasks = 4;
409+
405410
// The configuration for handle Oracle large objects.
406411
oneof large_objects_handling {
407412
// Drop large object values.
408413
DropLargeObjects drop_large_objects = 100;
409414

410-
// Stream large object values.
415+
// Stream large object values. NOTE: This feature is currently experimental.
411416
StreamLargeObjects stream_large_objects = 102;
412417
}
413418
}
@@ -473,13 +478,21 @@ message PostgresqlSourceConfig {
473478
// PostgreSQL objects to exclude from the stream.
474479
PostgresqlRdbms exclude_objects = 2;
475480

476-
// Required. The name of the logical replication slot that's configured with the
477-
// pgoutput plugin.
478-
string replication_slot = 3 [(google.api.field_behavior) = REQUIRED];
481+
// Required. Immutable. The name of the logical replication slot that's
482+
// configured with the pgoutput plugin.
483+
string replication_slot = 3 [
484+
(google.api.field_behavior) = REQUIRED,
485+
(google.api.field_behavior) = IMMUTABLE
486+
];
479487

480-
// Required. The name of the publication that includes the set of all tables that are
481-
// defined in the stream's include_objects.
488+
// Required. The name of the publication that includes the set of all tables
489+
// that are defined in the stream's include_objects.
482490
string publication = 4 [(google.api.field_behavior) = REQUIRED];
491+
492+
// Maximum number of concurrent backfill tasks. The number should be non
493+
// negative. If not set (or set to 0), the system's default value will be
494+
// used.
495+
int32 max_concurrent_backfill_tasks = 5;
483496
}
484497

485498
// MySQL Column.
@@ -544,6 +557,11 @@ message MysqlSourceConfig {
544557
// Maximum number of concurrent CDC tasks. The number should be non negative.
545558
// If not set (or set to 0), the system's default value will be used.
546559
int32 max_concurrent_cdc_tasks = 3;
560+
561+
// Maximum number of concurrent backfill tasks. The number should be non
562+
// negative. If not set (or set to 0), the system's default value will be
563+
// used.
564+
int32 max_concurrent_backfill_tasks = 4;
547565
}
548566

549567
// The configuration of the stream source.
@@ -571,9 +589,7 @@ message SourceConfig {
571589
}
572590

573591
// AVRO file format configuration.
574-
message AvroFileFormat {
575-
576-
}
592+
message AvroFileFormat {}
577593

578594
// JSON file format configuration.
579595
message JsonFileFormat {
@@ -617,7 +633,8 @@ message GcsDestinationConfig {
617633
int32 file_rotation_mb = 2;
618634

619635
// The maximum duration for which new events are added before a file is
620-
// closed and a new file is created.
636+
// closed and a new file is created. Values within the range of 15-60 seconds
637+
// are allowed.
621638
google.protobuf.Duration file_rotation_interval = 3;
622639

623640
// File Format that the data should be written in.
@@ -630,9 +647,11 @@ message GcsDestinationConfig {
630647
}
631648
}
632649

650+
// BigQuery destination configuration
633651
message BigQueryDestinationConfig {
634652
// A single target dataset to which all data will be streamed.
635653
message SingleTargetDataset {
654+
// The dataset ID of the target dataset.
636655
string dataset_id = 1;
637656
}
638657

@@ -661,6 +680,7 @@ message BigQueryDestinationConfig {
661680
string kms_key_name = 3;
662681
}
663682

683+
// The dataset template to use for dynamic dataset creation.
664684
DatasetTemplate dataset_template = 2;
665685
}
666686

@@ -759,18 +779,18 @@ message Stream {
759779
}
760780

761781
// Backfill strategy to disable automatic backfill for the Stream's objects.
762-
message BackfillNoneStrategy {
763-
764-
}
782+
message BackfillNoneStrategy {}
765783

766784
// Output only. The stream's name.
767785
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
768786

769787
// Output only. The creation time of the stream.
770-
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
788+
google.protobuf.Timestamp create_time = 2
789+
[(google.api.field_behavior) = OUTPUT_ONLY];
771790

772791
// Output only. The last update time of the stream.
773-
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
792+
google.protobuf.Timestamp update_time = 3
793+
[(google.api.field_behavior) = OUTPUT_ONLY];
774794

775795
// Labels.
776796
map<string, string> labels = 4;
@@ -782,7 +802,8 @@ message Stream {
782802
SourceConfig source_config = 6 [(google.api.field_behavior) = REQUIRED];
783803

784804
// Required. Destination connection profile configuration.
785-
DestinationConfig destination_config = 7 [(google.api.field_behavior) = REQUIRED];
805+
DestinationConfig destination_config = 7
806+
[(google.api.field_behavior) = REQUIRED];
786807

787808
// The state of the stream.
788809
State state = 8;
@@ -804,7 +825,8 @@ message Stream {
804825
// If provided, it will be used to encrypt the data.
805826
// If left blank, data will be encrypted using an internal Stream-specific
806827
// encryption key provisioned through KMS.
807-
optional string customer_managed_encryption_key = 10 [(google.api.field_behavior) = IMMUTABLE];
828+
optional string customer_managed_encryption_key = 10
829+
[(google.api.field_behavior) = IMMUTABLE];
808830
}
809831

810832
// A specific stream object (e.g a specific DB table).
@@ -818,10 +840,12 @@ message StreamObject {
818840
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
819841

820842
// Output only. The creation time of the object.
821-
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
843+
google.protobuf.Timestamp create_time = 2
844+
[(google.api.field_behavior) = OUTPUT_ONLY];
822845

823846
// Output only. The last update time of the object.
824-
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
847+
google.protobuf.Timestamp update_time = 3
848+
[(google.api.field_behavior) = OUTPUT_ONLY];
825849

826850
// Required. Display name.
827851
string display_name = 5 [(google.api.field_behavior) = REQUIRED];
@@ -930,10 +954,12 @@ message BackfillJob {
930954
Trigger trigger = 2;
931955

932956
// Output only. Backfill job's start time.
933-
google.protobuf.Timestamp last_start_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
957+
google.protobuf.Timestamp last_start_time = 3
958+
[(google.api.field_behavior) = OUTPUT_ONLY];
934959

935960
// Output only. Backfill job's end time.
936-
google.protobuf.Timestamp last_end_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
961+
google.protobuf.Timestamp last_end_time = 4
962+
[(google.api.field_behavior) = OUTPUT_ONLY];
937963

938964
// Output only. Errors which caused the backfill job to fail.
939965
repeated Error errors = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

packages/google-cloud-datastream/protos/protos.d.ts

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)