[
https://issues.apache.org/jira/browse/KAFKA-19828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035399#comment-18035399
]
Nikita Shupletsov commented on KAFKA-19828:
-------------------------------------------
I poked a bit more, truncating the time to hour also works: {{Instant flowTime
= baseTime.minus(3, ChronoUnit.HOURS).truncatedTo(ChronoUnit.HOURS);}}
I am not 100% sure why, but my impression so far is that because we aggregate
every hour: {{{}TimeWindows.ofSizeAndGrace(Duration.ofHours(1),
Duration.ofMinutes(10){}}}, so if we are start from not a round hour, it's
possible that the messages we send in the test will not always end up in the
windows we expect them to.
I still need to spend more time looking at the code to find the exact piece
that's responsible for that, so my conclusion may not be 100% accurate, but the
empirically achieved results kind of back up my assumptions.
> Intermittent test failures when using chained emit strategy on window close
> ---------------------------------------------------------------------------
>
> Key: KAFKA-19828
> URL: https://issues.apache.org/jira/browse/KAFKA-19828
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Reporter: Greg F
> Priority: Major
> Attachments: ChainedEmitStrategyTopologyTest3.java, log.txt
>
>
> Hi,
> I have a test case that contains a topology with 2 time windows and chained
> emitStrategy calls. The standalone reproduction use case is attached to this
> issue
> The problem is that about 25% of the time the test fails. About 75% of the
> time the test succeeds. I followed the conclusions of
> !https://issues.apache.org/jira/secure/viewavatar?size=xsmall&avatarId=21133&avatarType=issuetype|width=16,height=16!
> KAFKA-19810
> to make sure that I am sending events at the correct times (at least I think
> my calculations are correct). I really need to get to the bottom of why the
> test fails intermittently, as the test somewhat reflects a real life topology
> of a project I am working on, and we cannot have an intermittently failing
> test in our build pipeline.
> Greg
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)