You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chun-Hao Tang (Jira)" <ji...@apache.org> on 2021/07/15 18:22:00 UTC

[jira] [Assigned] (KAFKA-13094) Session windows do not consider user-specified grace when computing retention time for changelog

     [ https://issues.apache.org/jira/browse/KAFKA-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chun-Hao Tang reassigned KAFKA-13094:
-------------------------------------

    Assignee: Chun-Hao Tang

> Session windows do not consider user-specified grace when computing retention time for changelog
> ------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-13094
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13094
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.8.0
>            Reporter: Bruno Cadonna
>            Assignee: Chun-Hao Tang
>            Priority: Major
>
> Session windows use internally method {{maintainMs()}} to compute the retention time for their changelog topic if users do not provide a retention time explicitly with {{Materilaized}}. However, {{maintainMs()}} does not consider user-specified grace period when computing the retention time.
> The bug can be verified with the following test method:
> {code:java}
> @Test
> public void shouldUseGapAndGraceAsRetentionTimeIfBothCombinedAreLargerThanDefaultRetentionTime() {
>     final Duration gapSize = ofDays(1);
>     final Duration gracePeriod = ofMillis(2);
>     assertEquals(
>         gapSize.toMillis() + gracePeriod.toMillis(), 
>         SessionWindows.with(gapSize).grace(gracePeriod).maintainMs()
>     );
> }
> {code}   
> The test should pass since the retention time of the changelog topic should be gap + grace. However, the test fails. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)