feat: Use TopicStats to implement getSplitBacklog#228
Merged
palmere-google merged 4 commits intomasterfrom Sep 15, 2020
Merged
Conversation
e75f6e0 to
fe55c09
Compare
Codecov Report
@@ Coverage Diff @@
## master #228 +/- ##
============================================
- Coverage 72.71% 72.23% -0.48%
+ Complexity 752 746 -6
============================================
Files 139 135 -4
Lines 3987 4009 +22
Branches 209 207 -2
============================================
- Hits 2899 2896 -3
- Misses 965 991 +26
+ Partials 123 122 -1 Continue to review full report at Codecov.
|
dpcollins-google
requested changes
Aug 31, 2020
Collaborator
dpcollins-google
left a comment
There was a problem hiding this comment.
You'll also have to integrate the changes made to the topic path creation logic in this pr.
...ublite-beam-io/src/main/java/com/google/cloud/pubsublite/beam/PubsubLiteUnboundedReader.java
Show resolved
Hide resolved
...ublite-beam-io/src/main/java/com/google/cloud/pubsublite/beam/PubsubLiteUnboundedReader.java
Show resolved
Hide resolved
...ublite-beam-io/src/main/java/com/google/cloud/pubsublite/beam/PubsubLiteUnboundedReader.java
Outdated
Show resolved
Hide resolved
...ublite-beam-io/src/main/java/com/google/cloud/pubsublite/beam/PubsubLiteUnboundedReader.java
Outdated
Show resolved
Hide resolved
pubsublite-beam-io/src/main/java/com/google/cloud/pubsublite/beam/SubscriberOptions.java
Outdated
Show resolved
Hide resolved
pubsublite-beam-io/src/main/java/com/google/cloud/pubsublite/beam/SubscriberOptions.java
Outdated
Show resolved
Hide resolved
We use the TopicStatsService to compute the backlog size for the assigned splits in the PubsubLiteUnbounded Reader. We will refresh backlog information every ten seconds, and will use stale information for up to a minute if the topic stats serivce is unavailable. Constructing the TopicBacklogReader in SubscriberOptions is a bit awkward, but I wanted to make sure we don't need to re-resolve the subscription -> topic mapping when we split or merge the source. Otherwise we end up with a hard dependency on the admin service.
5b7c5eb to
635b040
Compare
Contributor
Author
|
Okay, rebased to include the path changes PTAL |
dpcollins-google
requested changes
Sep 1, 2020
pubsublite-beam-io/src/main/java/com/google/cloud/pubsublite/beam/SubscriberOptions.java
Show resolved
Hide resolved
19d237b to
8a9ad0b
Compare
8a9ad0b to
aceb092
Compare
dpcollins-google
approved these changes
Sep 8, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We use the TopicStatsService to compute the backlog size for the
assigned splits in the PubsubLiteUnbounded Reader.
We will refresh backlog information every ten seconds, and will use
stale information for up to a minute if the topic stats serivce is
unavailable.
Constructing the TopicBacklogReader in SubscriberOptions is a bit
awkward, but I wanted to make sure we don't need to re-resolve the
subscription -> topic mapping when we split or merge the source.
Otherwise we end up with a hard dependency on the admin service.