[
https://issues.apache.org/jira/browse/BEAM-14129?focusedWorklogId=745394&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-745394
]
ASF GitHub Bot logged work on BEAM-14129:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Mar/22 19:29
Start Date: 21/Mar/22 19:29
Worklog Time Spent: 10m
Work Description: dpcollins-google commented on a change in pull request
#17103:
URL: https://github.com/apache/beam/pull/17103#discussion_r831471930
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsublite/internal/SubscriptionPartitionLoader.java
##########
@@ -47,15 +46,99 @@
private final SubscriptionPath subscription;
private final SerializableFunction<TopicPath, Integer> getPartitionCount;
private final Duration pollDuration;
- private final boolean terminate;
+ private final SerializableSupplier<Boolean> terminate;
+
+ private class GeneratorFn extends DoFn<Void, SubscriptionPartition> {
+ @ProcessElement
+ public ProcessContinuation processElement(
+ OutputReceiver<SubscriptionPartition> output,
+ RestrictionTracker<Integer, Integer> restrictionTracker) {
+ int previousCount = restrictionTracker.currentRestriction();
+ int newCount = getPartitionCount.apply(topic);
+ if (newCount <= previousCount) {
+ return ProcessContinuation.resume().withResumeDelay(pollDuration);
+ }
+ if (!restrictionTracker.tryClaim(newCount)) {
+ return ProcessContinuation.stop();
+ }
Review comment:
Understood, see above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 745394)
Time Spent: 10h 50m (was: 10h 40m)
> Fix issues with Pub/Sub Lite IO at high volumes
> -----------------------------------------------
>
> Key: BEAM-14129
> URL: https://issues.apache.org/jira/browse/BEAM-14129
> Project: Beam
> Issue Type: Task
> Components: io-java-gcp
> Reporter: Daniel Collins
> Assignee: Daniel Collins
> Priority: P1
> Fix For: 2.38.0
>
> Time Spent: 10h 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)