Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add new_partitions field for CloseStream for Cloud Bigtable ChangeStream #1247

Merged
merged 2 commits into from
Mar 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions protos/google/bigtable/v2/bigtable.proto
Original file line number Diff line number Diff line change
@@ -788,17 +788,37 @@ message ReadChangeStreamResponse {
}

// A message indicating that the client should stop reading from the stream.
// If status is OK and `continuation_tokens` is empty, the stream has finished
// (for example if there was an `end_time` specified).
// If `continuation_tokens` is present, then a change in partitioning requires
// the client to open a new stream for each token to resume reading.
// If status is OK and `continuation_tokens` & `new_partitions` are empty, the
// stream has finished (for example if there was an `end_time` specified).
// If `continuation_tokens` & `new_partitions` are present, then a change in
// partitioning requires the client to open a new stream for each token to
// resume reading. Example:
// [B, D) ends
// |
// v
// new_partitions: [A, C) [C, E)
// continuation_tokens.partitions: [B,C) [C,D)
// ^---^ ^---^
// ^ ^
// | |
// | StreamContinuationToken 2
// |
// StreamContinuationToken 1
// To read the new partition [A,C), supply the continuation tokens whose
// ranges cover the new partition, for example ContinuationToken[A,B) &
// ContinuationToken[B,C).
message CloseStream {
// The status of the stream.
google.rpc.Status status = 1;

// If non-empty, contains the information needed to start reading the new
// partition(s) that contain segments of this partition's row range.
// If non-empty, contains the information needed to resume reading their
// associated partitions.
repeated StreamContinuationToken continuation_tokens = 2;

// If non-empty, contains the new partitions to start reading from, which
// are related to but not necessarily identical to the partitions for the
// above `continuation_tokens`.
repeated StreamPartition new_partitions = 3;
}

// The data or control message on the stream.
6 changes: 6 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 46 additions & 1 deletion protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.