Bruno Cadonna created KAFKA-13094:
-------------------------------------
Summary: 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
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 windowsSize = ofDays(1).minus(ofMillis(1));
final Duration gracePeriod = ofMillis(2);
assertEquals(windowsSize.toMillis() + gracePeriod.toMillis(),
SessionWindows.with(windowsSize).grace(gracePeriod).maintainMs());
}
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)