scwhittle commented on code in PR #37648:
URL: https://github.com/apache/beam/pull/37648#discussion_r2833699936


##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaExactlyOnceSink.java:
##########
@@ -176,13 +180,27 @@ public PCollection<Void> 
expand(PCollection<ProducerRecord<K, V>> input) {
     return input
         .apply(
             Window.<ProducerRecord<K, V>>into(new GlobalWindows()) // 
Everything into global window.
-                
.triggering(Repeatedly.forever(AfterPane.elementCountAtLeast(1)))
+                .triggering(
+                    Repeatedly.forever(
+                        AfterFirst.of(
+                            AfterPane.elementCountAtLeast(numElements),
+                            
AfterProcessingTime.pastFirstElementInPane().plusDelayOf(timeout))))
                 .discardingFiredPanes())
         .apply(
             String.format("Shuffle across %d shards", numShards),
             ParDo.of(new Reshard<>(numShards)))
         .apply("Persist sharding", GroupByKey.create())
         .apply("Assign sequential ids", ParDo.of(new Sequencer<>()))
+        .apply(

Review Comment:
   we discussed, it looks like this is because the continuation trigger changes 
it to aftercount(1)
   
   can you add a comment here
   // Reapply the windowing configuration as the continuation trigger doesn't 
maintain the desired batching.



-- 
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]

Reply via email to