You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2021/05/24 01:35:00 UTC
[jira] [Updated] (KAFKA-12839) SlidingWindow with timeDifference 0
fails
[ https://issues.apache.org/jira/browse/KAFKA-12839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias J. Sax updated KAFKA-12839:
------------------------------------
Summary: SlidingWindow with timeDifference 0 fails (was: SlidingWindow with size 0 fails)
> SlidingWindow with timeDifference 0 fails
> -----------------------------------------
>
> Key: KAFKA-12839
> URL: https://issues.apache.org/jira/browse/KAFKA-12839
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Reporter: Matthias J. Sax
> Assignee: Luke Chen
> Priority: Major
> Labels: needs-kip
>
> Trying to use a sliding window with time-difference 0 (that is officially supported) fails with an exception and Kafka Stream crashes with
> {{IllegalArgumentException: Window endMs must be greater than window startMs}}
> The underlying issue is the usage of {{TimeWindow}} to represent the window what is incorrect.
> {{TimeWindow}} is designed for hopping/tumbling windows with an inclusive lower and exclusive upper bound. Thus, the upper bound must be larger than the lower bound, because otherwise the window would have a negative size what is not allowed.
> For sliding windows, we use include lower and upper bound though, and thus want to set upper and lower bound to be the same, what would still result in a window of size 1 (note that time-difference of 0 results in window size 1).
> It seems we need to introduce a new {{SlidingWindow}} type.
> Note, that for a non-zero time-difference, the window bounds are computed "correctly", however, {{TimeWindow}} is still an incorrect representation because it represents `[start,end)` instead of `[start,end]`.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)